//获取页面传来的参数
var scriptArgs = document.getElementById('kimScript').getAttribute('data');

//参数-----
var max_visitor;
var c_accountId ;
var xml_path = "http://kim.kenfor.com";
var isIe = false;
var tagPage = "default.jsp";

var is_ie7 = false;
var wlt_path = "wlt.kenfor.com";
//var wlt_path = "localhost:81";
var ado = "/im/postAction.do";
var kacct ;
var get_msg_time_scape = 17000;
var cpw = 630;
var cph = 451;
var __delta = 0.15;
var encode_str_s;
//interface_lan = <%=ln%>
var my_static = 2;
var v_vno = "";
var skin_path;
var interface_lan = 0;
var target_ln = interface_lan;
var online_pic;
var offline_pic;
var auto_get_msg;
var visiter_ip;
var pos;
var im_skin;
var im_style;
var kDef_opt;
var blandhost;
var bottype;
var faq_count;
var target_name;
var offsetH;
var is_show_ssi;
var new_imstyle;
var newonline_pic;
var newoffline_pic;
var fixed_three;
var fixed_two;
var fixed_one;
var use_wltversion;
var newpos;
var newoffseth;
var newpic;
var visiter;
var newcolor;
var end_date_flag;
var round_cliend_id;
var is_show = false;
var is_average = false;
var toBody = document.body;
var kDoc = document;
var this_title = kDoc.title;
var this_url = location.href;
var client_id;
var min_clients_target_id;
var win_open;
var this_referr = kDoc.referrer;
var _ur = this_referr;
var all_user_list = new Array();
var k_lang = new Array(new Array("%E6%96%B0%E4%BF%A1%E6%81%AF%E6%8F%90%E7%A4%BA.", "%E4%BF%A1%E6%81%AF%E6%8F%90%E7%A4%BA", "%E5%85%B3%E9%97%AD", "%E4%BC%9A%E5%91%98%E6%9C%8D%E5%8A%A1%E5%B7%B2%E8%BF%87%E6%9C%9F!", "%E5%8D%B3%E6%97%B6%E4%BA%A4%E6%B5%81", "%E6%B8%B8%E5%AE%A2", "%E7%BD%91%E7%AB%99%E6%93%8D%E4%BD%9C%E8%80%85%EF%BC%88", "%EF%BC%89%E8%AF%B7%E6%B1%82%E8%81%8A%E5%A4%A9%EF%BC%8C%E6%82%A8%E6%98%AF%E5%90%A6%E6%8E%A5%E5%8F%97%EF%BC%9F", "%E6%8E%A5%E5%8F%97", "%E6%8B%92%E7%BB%9D", "%E5%AF%B9%E6%96%B9%E4%B8%8D%E5%9C%A8%E7%BA%BF%2C%E7%82%B9%E5%87%BB%E7%95%99%E8%A8%80.", "%E5%AF%B9%E6%96%B9%E5%A4%84%E4%BA%8E%E5%BF%99%E7%A2%8C%E7%8A%B6%E6%80%81", "%E5%AF%B9%E6%96%B9%E5%A4%84%E4%BA%8E%E7%A6%BB%E5%BC%80%E7%8A%B6%E6%80%81", "%E8%AE%BF%E5%AE%A2%E7%95%99%E8%A8%80", "%E5%A7%93%E5%90%8D", "%E6%80%A7%E5%88%AB", "%E5%85%88%E7%94%9F", "%E5%A5%B3%E5%A3%AB", "%E9%82%AE%E4%BB%B6%E5%9C%B0%E5%9D%80", "%E5%9C%B0%E5%9D%80", "%E7%94%B5%E8%AF%9D", "%E7%95%99%E8%A8%80%E5%86%85%E5%AE%B9", "%E5%8F%91%E9%80%81%E7%95%99%E8%A8%80", "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%82%A8%E7%9A%84%E5%A7%93%E5%90%8D.", "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%82%A8%E7%9A%84EMAIL%E5%9C%B0%E5%9D%80.", "%E8%AF%B7%E8%BE%93%E5%85%A5%E4%B8%80%E4%B8%AA%E6%AD%A3%E7%A1%AE%E7%9A%84EMAIL%E5%9C%B0%E5%9D%80!", "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%82%A8%E7%9A%84%E8%81%94%E7%B3%BB%E5%9C%B0%E5%9D%80.", "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%82%A8%E7%9A%84%E8%81%94%E7%B3%BB%E7%94%B5%E8%AF%9D.", "%E8%AF%B7%E8%BE%93%E5%85%A5%E6%82%A8%E7%9A%84%E7%95%99%E8%A8%80.", "%E7%95%99%E8%A8%80%E6%88%90%E5%8A%9F.", "%E6%89%93%E5%BC%80", "%E6%82%A8%E5%A5%BD%2C%E6%9D%A5%E8%87%AA", "%E7%9A%84%E6%9C%8B%E5%8F%8B", "%E5%A6%82%E9%9C%80%E5%92%A8%E8%AF%A2%E8%AF%B7%E6%8E%A5%E5%8F%97%E9%82%80%E8%AF%B7%2C%E5%BC%80%E5%A7%8B%E5%8D%B3%E6%97%B6%E6%B2%9F%E9%80%9A.", "%E8%AF%B7%E7%82%B9%E5%87%BB%E5%AE%A2%E6%9C%8D%E5%90%8D%E7%A7%B0%3Cbr%2F%3E%E5%8D%B3%E6%97%B6%E4%BA%A4%E8%B0%88%E6%88%96%E7%95%99%E8%A8%80", "%E6%82%A8%E5%A5%BD%2C%E6%AC%A2%E8%BF%8E%E5%85%89%E4%B8%B4%E6%9C%AC%E7%AB%99%2C%E6%9C%89%E4%BB%80%E4%B9%88%E5%8F%AF%E4%BB%A5%E5%B8%AE%E5%88%B0%E6%82%A8%E5%91%A2%3F", "%E7%BB%99%E6%82%A8%E7%99%BC%E4%BA%86%E8%81%8A%E5%A4%A9%E4%BF%A1%E6%81%AF%2C%E7%82%B9%E5%87%BB%E6%89%93%E5%BC%80!", "%E6%9C%89%E7%96%91%E9%97%AE%3F%E7%82%B9%E5%87%BB%E9%A9%AC%E4%B8%8A%E4%B8%BA%E6%82%A8%E8%A7%A3%E7%AD%94!", "%E5%9C%A8%E7%BA%BF%E7%95%99%E8%A8%80", "%E5%9C%A8%E7%BA%BF%E6%B2%9F%E9%80%9A", "%E6%9C%BA%E5%99%A8%E4%BA%BA", "%E5%95%86%E5%8A%A1%E6%90%9C", "%E5%81%9A%E7%94%9F%E6%84%8F%E7%94%A8%E5%95%86%E5%8A%A1%E6%90%9C", "%e5%85%ac%e5%8f%b8%e5%90%8d%e7%a7%b0","提交","还可以输入","字","留言成功","好的","在线客服","欢迎您！","请问有什么可以帮您？点击“接受”进入在线咨询。","暂不接受","访客留言","先生","女士","还可以输入360个字"), 
			new Array("%E6%96%B0%E8%B3%87%E8%A8%8A%E6%8F%90%E7%A4%BA.", "%E8%B3%87%E8%A8%8A%E6%8F%90%E7%A4%BA", "%E9%97%9C%E9%96%89", "%E6%9C%83%E5%93%A1%E6%9C%8D%E5%8B%99%E5%B7%B2%E9%81%8E%E6%9C%9F!", "%E5%8D%B3%E6%99%82%E4%BA%A4%E6%B5%81", "%E9%81%8A%E5%AE%A2", "%E7%B6%B2%E7%AB%99%E6%93%8D%E4%BD%9C%E8%80%85%EF%BC%88", "%EF%BC%89%E8%AB%8B%E6%B1%82%E8%81%8A%E5%A4%A9%EF%BC%8C%E6%82%A8%E6%98%AF%E5%90%A6%E6%8E%A5%E5%8F%97%EF%BC%9F", "%E6%8E%A5%E5%8F%97", "%E6%8B%92%E7%B5%95", "%E5%B0%8D%E6%96%B9%E4%B8%8D%E5%9C%A8%E7%B7%9A%2C%E9%BB%9E%E6%93%8A%E7%95%99%E8%A8%80.", "%E5%B0%8D%E6%96%B9%E8%99%95%E6%96%BC%E5%BF%99%E7%A2%8C%E7%8B%80%E6%85%8B", "%E5%B0%8D%E6%96%B9%E8%99%95%E6%96%BC%E9%9B%A2%E9%96%8B%E7%8B%80%E6%85%8B", "%E8%A8%AA%E5%AE%A2%E7%95%99%E8%A8%80", "%E5%A7%93%E5%90%8D", "%E6%80%A7%E5%88%A5", "%E5%85%88%E7%94%9F", "%E5%A5%B3%E5%A3%AB", "%E9%83%B5%E4%BB%B6%E5%9C%B0%E5%9D%80", "%E5%9C%B0%E5%9D%80", "%E9%9B%BB%E8%A9%B1", "%E7%95%99%E8%A8%80%E5%85%A7%E5%AE%B9", "%E7%99%BC%E9%80%81%E7%95%99%E8%A8%80", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E6%82%A8%E7%9A%84%E6%94%B9%E5%90%8D.", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E6%82%A8%E7%9A%84EMAIL%E5%9C%B0%E5%9D%80.", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E4%B8%80%E5%80%8B%E6%AD%A3%E7%A2%BA%E7%9A%84EMAIL%E5%9C%B0%E5%9D%80!", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E6%82%A8%E7%9A%84%E8%81%AF%E7%B9%AB%E5%9C%B0%E5%9D%80.", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E6%82%A8%E7%9A%84%E8%81%AF%E7%B9%AB%E9%9B%BB%E8%A9%B1.", "%E8%AB%8B%E8%BC%B8%E5%85%A5%E6%82%A8%E7%9A%84%E7%95%99%E8%A8%80.", "%E7%95%99%E8%A8%80%E6%88%90%E5%8A%9F.", "%E6%89%93%E9%96%8B", "%E6%82%A8%E5%A5%BD%2C%E4%BE%86%E8%87%AA", "%E7%9A%84%E6%9C%8B%E5%8F%8B", "%E5%A6%82%E6%9E%9C%E6%82%A8%E6%9C%89%E4%BB%BB%E4%BD%95%E5%95%8F%E9%A1%8C%E8%AB%8B%E6%8E%A5%E5%8F%97%E6%AD%A4%E9%82%80%E8%AB%8B%E4%BB%A5%E9%96%8B%E5%A7%8B%E5%8D%B3%E6%99%82%E6%BA%9D%E9%80%9A.", "%E8%AB%8B%E9%BB%9E%E6%93%8A%E5%AE%A2%E6%9C%8D%E5%90%8D%E7%A8%B1%3Cbr%2F%3E%E5%8D%B3%E6%99%82%E4%BA%A4%E8%AB%87%E6%88%96%E7%95%99%E8%A8%80", "%E6%82%A8%E5%A5%BD%2C%E6%AD%A1%E8%BF%8E%E5%85%89%E8%87%A8%E6%9C%AC%E7%AB%99%2C%E6%9C%89%E4%BB%80%E9%BA%BD%E5%8F%AF%E4%BB%A5%E5%B9%AB%E5%88%B0%E6%82%A8%E5%91%A2%3F", "%E7%B5%A6%E6%82%A8%E7%99%BC%E4%BA%86%E8%81%8A%E5%A4%A9%E8%B3%87%E8%A8%8A%2C%E9%BB%9E%E6%93%8A%E6%89%93%E9%96%8B!", "%E6%9C%89%E7%96%91%E5%95%8F%3F%E9%BB%9E%E6%93%8A%E9%A6%AC%E4%B8%8A%E7%82%BA%E6%82%A8%E8%A7%A3%E7%AD%94!", "%E5%9C%A8%E7%B7%9A%E7%95%99%E8%A8%80", "%E5%9C%A8%E7%B7%9A%E6%B2%9F%E9%80%9A", "%E6%A9%9F%E5%99%A8%E4%BA%BA", "%E5%95%86%E5%8B%99%E6%90%9C", "%E5%81%9A%E7%94%9F%E6%84%8F%E7%94%A8%E5%95%86%E5%8B%99%E6%90%9C", "%e5%85%ac%e5%8f%b8%e5%90%8d%e7%a8%b1","提交","還可以輸入","字","留言成功","好的","在線客服","歡迎您！","請問有什麼可以幫您？點擊“接受”進入線上諮詢。”进入在线咨询。","暫不接受","訪客留言","先生","女士","還可以輸入360個字"), 
			new Array("New%20Message%20Arrived.", "Notice", "Close", "Member%20Expired.", "Chat%20Now.", "Guest", "WebSite%20Client%20Service%20(", ")%20request%20chat%20with%20you.Do%20you%20agree%3F", "I%20agree", "I%20refuse", "Operator%20is%20offline%2Cclick%20to%20leave%20a%20message.", "Operator%20is%20busy", "Operator%20is%20away.", "Send%20Message", "Name", "Sex", "male", "female", "E-Mail", "Address", "Phone", "Message", "Send!", "Name%20is%20Requested.", "E-Mail%20is%20Requested.", "Please%20fill%20a%20correct%20EMAIL%20address.", "Address%20is%20Requested.", "Phone%20is%20Requested.", "Message%20is%20Requested.", "Send%20Message%20success.", "Open", "Welcome%20", "'s%20friend", "If%20you%20have%20any%20questions%2Cplease%20Click%20'Agree'.", "Chat%20or%20Leave<br>Message.", "Welcome%2Cwhat%20can%20I%20do%20for%20you%3F", "had%20been%20sent%20Message%20to%20you.click%20here%20open%20it!", "Fall%20in%20trouble%3F%20Click%20here%20for%20HELP.", "Leave%20a%20Message", "Online%20Communication", "Robot", "35so.cc", "35so.cc", "Company%20Name","submit","Also you can enter "," Word","Success message","OK","online customer service","Welcome you!","Is there anything I can do for you? Click \"agree\" to enter the online advisory.","Temporarily not accept","Guestbook","Sir","Ms","You can also enter the 360 words"));
var skinslib = new Array("default", "autumn", "blue", "green", "hot", "red", "summer");
var skinscss = new Array("#E265B1", "#AECD0F", "#65BAE2", "#FFC000", "#BF7500", "#B465E2", "#0FCDA3");
var message_window_img = new Array(new Array("but_accept.gif", "but_close.gif", "but_dialog.gif", "but_send.gif"), new Array("but_accept_big5.gif", "but_close_big5.gif", "but_dialog_big5.gif", "but_send_big5.gif"), new Array("but_accept_en.gif", "but_close_en.gif", "but_dialog_en.gif", "but_send_en.gif"));
var im_face = new Array("0", "/status/online_s.gif", "/status/offline_s.gif", "/status/busy_s.gif", "/status/leave_s.gif", "/status/offline_s.gif");
var im_status_tips = new Array(0, 4, 10, 11, 12, 10);
var online_user = new Array();
var KenFor_WangLingTong_ListContent_style = "";
var KenFor_WangLingTong_WebSite_style = "";
var KenFor_WangLingTong_ListTitle_style = "";
var wanglingtong_list_style = "";
var KenFor_WangLingTong_PerService_style = "";
var message_windows_notice = 0;
var message_window_title = 1;
var message_window_close = 2;
var member_expired = 3;
var guest_name = 5;
var request_header = 6;
var request_end = 7;
var agree_yes = 8;
var agree_no = 9;
var online_tips_msg = 4;
var offline_tips_msg = 10;
var buse_tips_msg = 11;
var away_tips_msg = 12;
var msg_box_title = 13;
var msg_box_name = 14;
var msg_box_sex = 15;
var msg_box_sex_boy = 16;
var msg_box_sex_girl = 17;
var msg_box_email = 18;
var msg_box_address = 19;
var msg_box_phone = 20;
var msg_box_contents = 21;
var msg_box_send = 22;
var msg_box_close = 2;
var meg_box_company_name = 43;
var msg_box_request_truename = 23;
var msg_box_request_email = 24;
var msg_box_correct_email = 25;
var msg_box_request_address = 26;
var msg_box_request_phone = 27;
var msg_box_request_contents = 28;
var meg_box_sent_success = 29;
var message_window_open = 30;
var msg_notice_1 = 31;
var msg_notice_2 = 32;
var msg_notice_3 = 33;
var list_tips = 34;
var welcome_msg_new = 35;
var new_message_array_new = 36;
var style_2_tips = 37;
var btn_3_off = 38;
var btn_3_on = 39;
var bot_name = 40;
var search_name = 41;
var search_show = 42;
// new
var msg_box_submit = 44;
var msg_box_hintbefore = 45;
var msg_box_hintafter = 46;
var msg_box_msgsuccess = 47;
var msg_box_ok = 48;
var online_customer_title = 49;
var welcome_title_p1 = 50;
var welcome_title_p2 = 51;
var agree_no_now  =52;

var src_type;
//是不是手机访问
var is_phone = false;
if (src_type == undefined) {
	src_type = 2;
}
var __collection;
var waitting;
var autopop_timmer;
var end_date;
var has_refuse = rC("has_refuse") == 1 ? true : false;
//参数
var scrollTop = document.body.scrollTop + document.documentElement.scrollTop;
var scrollLeft = kDoc.documentElement.scrollLeft + document.body.scrollLeft;
//给参数赋值----------begin
var imp_val = scriptArgs.split(",");
for(var cs = 0;cs < imp_val.length;cs++){

	if(imp_val[cs].split("=")[0]=="wlt_account_id"){
		c_accountId=imp_val[cs].split("=")[1];
	}else if(imp_val[cs].split("=")[0]=="wlt_ln"){
		interface_lan=imp_val[cs].split("=")[1];
		target_ln=imp_val[cs].split("=")[1];
	}
	
}
//给参数赋值----------end
//判断是否ie		
if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
	isIe = true;
}
function keC(str) {
	return encodeURIComponent(str);
}
function dT(timer) {
	clearInterval(timer);
}
function sT(fun, second) {
	return setInterval(fun, second);
}
function getObj(name) {
	return kDoc.getElementById(name);
}
function makeObj(name) {
	return kDoc.createElement(name);
}
function Trim(str) {
	if (str) {
		return str.replace(/(^\s*)|(\s*$)/g, "");
	} else {
		return "";
	}
}
function cP(mypage, myname, w, h, scroll) {
	is_need_sent_end_chat = 0;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2 - 20;
	if (is_ie7) {
		winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scroll + ",resizable=no,toolbar=no,status=no";
	} else {
		winprops = "width=" + (window.screen.availWidth - 10) + ",height=" + (window.screen.availHeight - 30) + ",top=0,left=0,toolbar=no,menubar=yes,scrollbars=yes, resizable=no,location=no, status=no";
	}

//				win_open = window.open('', myname, winprops);
	win_open = window.open(mypage, myname, winprops);
	if (parseInt(navigator.appVersion) >= 4) {
		try {
			win_open.window.focus();
		}
		catch (e) {
		}
	}
//				win_open.location=mypage;
}
function O_P_M_W(target_id) {
	
	var h = 603;
	var w = 867;
	var offpage = "<!DOCTYPE html><html id=\"LeaveMessage\"><head lang=\"zh\"><meta charset=\"UTF-8\"/><meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" /><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" /><title>" + GLS(msg_box_title) + "</title><link rel=\"stylesheet\" href=\"" + xml_path + "/css/bootstrap.min.css\"/><link rel=\"stylesheet\" href=\"" + xml_path + "/css/service.css\"/><script src=\"" + xml_path + "/js/jquery-1.11.1.min.js\"></script><script src=\"" + xml_path + "/js/message.js\" charset=\"UTF-8\"></script></head><body><input type=\"hidden\" id=\"meg_ln\" value=\""+target_ln+"\"/><div id=\"Div_LeaveMessageWrap\"><span onclick=\"window.close();\"></span><p>"+GLS(msg_box_title)+"</p><form id=\"message_box\" name=\"message_box\"><div class=\"row\"><input id=\"Inp_CompanyName\" title=\"" + GLS(meg_box_company_name) + "\" class=\"Placeholder\" type=\"text\" name=\"company_name\" maxlength=\"120\" value=\"" + GLS(meg_box_company_name) + "\" /></div><div class=\"row\"><input id=\"Inp_Name\" class=\"Placeholder\" type=\"text\" name=\"true_name\"  title=\"" + GLS(msg_box_name) + "\" size=\"12\" maxlength=\"8\" value=\"" + GLS(msg_box_name) + "\" /><div class=\"row\"><input   type=\"radio\" name=\"sex\" checked value=\"" + GLS(msg_box_sex_boy) + "\"/><span>" + GLS(msg_box_sex_boy) + "</span><input id=\"Inp_Sex\"  type=\"radio\" name=\"sex\" value=\"" + GLS(msg_box_sex_girl) + "\"/><span>"+GLS(msg_box_sex_girl)+"</span></div><div class=\"row\"><input id=\"Inp_Email\" class=\"Placeholder\" type=\"text\" name=\"email\" maxlength=\"120\" title=\"EMAIL\" value=\"" + GLS(msg_box_email) + "\" /></div><div class=\"row\"><input id=\"Inp_Address\" class=\"Placeholder\" title=\"" + GLS(msg_box_address) + "\" type=\"text\" name=\"address\" maxlength=\"60\" value=\"" + GLS(msg_box_address) + "\" /></div><div class=\"row\"><input id=\"Inp_Tel\" class=\"Placeholder\" type=\"text\" name=\"phone\" title=\"" + GLS(msg_box_phone) + "\"  maxlength=\"20\"  value=\"" + GLS(msg_box_phone) + "\" /></div><div class=\"row\"><textarea id=\"Tex_LeaveContent\" class=\"Placeholder\" title=\"" + GLS(msg_box_contents) + "\" name=\"contents\">"+GLS(msg_box_contents)+"</textarea></div><div class=\"row\"><a id=\"A_LeavePost\" class=\"pull-left text-center\" href=\"javascript:void(0);\" onclick=\"javascript:if(ck_form(window,document.message_box)){opener.DI_Dialog(window,document.message_box," + target_id + ");LeaveSuccess();}\">"+GLS(msg_box_submit)+"</a><span class=\"Spa_TipsWord\" id=\"error\"></span><span id=\"Spa_LeaveWordNum\" class=\"pull-right\">"+GLS(msg_box_hintbefore)+200+GLS(msg_box_hintafter)+"</span></div></form><div class=\"Div_DiscussMask\"><div id=\"Div_LeaveMessageSuccess\" class=\"text-center\"><p>"+GLS(msg_box_msgsuccess)+"</p><span onclick=\"window.close();\">"+GLS(msg_box_ok)+"</span></div></div></div></body></html>";
//	var offpage = '<!DOCTYPE html><html id="LeaveMessage"><head lang="zh"><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=Edge" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no" /><title>'+GLS(msg_box_title)+'</title><link rel="stylesheet" href="'+xml_path+'/css/bootstrap.min.css"/><link rel="stylesheet" href="'+xml_path+'/css/service.css"/><script src="'+xml_path+'/js/jquery-1.11.1.min.js"></script><script src="'+xml_path+'/js/message.js" charset="UTF-8"></script></head><body><div id="Div_LeaveMessageWrap"><span onclick="window.close();"></span><p>访客留言</p><form id="message_box" name="message_box"><div class="row"><input id="Inp_CompanyName" title="'+GLS(meg_box_company_name)+'" class="Placeholder" type="text" name="company_name" maxlength="120" value="'+GLS(meg_box_company_name)+'" /></div><div class="row"><input id="Inp_Name" class="Placeholder" type="text" name="true_name"  title="'+GLS(msg_box_name)+'" size="12" maxlength="8" value="'+GLS(msg_box_name)+'" /><div class="row"><input   type="radio" name="sex" checked value="先生"/><span>先生</span><input id="Inp_Sex"  type="radio" name="sex" value="女士"/><span>女士</span></div><div class="row"><input id="Inp_Email" class="Placeholder" type="text" name="email" maxlength="120" title="EMAIL" value="'+GLS(msg_box_email)+'" /></div><div class="row"><input id="Inp_Address" class="Placeholder" title="'+GLS(msg_box_address)+'" type="text" name="address" maxlength="60" value="'+GLS(msg_box_address)+'" /></div><div class="row"><input id="Inp_Tel" class="Placeholder" type="text" name="phone" title="'+GLS(msg_box_phone)+'"  maxlength="20"  value="'+GLS(msg_box_phone)+'" /></div><div class="row"><textarea id="Tex_LeaveContent" class="Placeholder" title="'+GLS(msg_box_contents)+'" name="contents">'+GLS(msg_box_contents)+'</textarea></div><div class="row"><a id="A_LeavePost" class="pull-left text-center" href="javascript:void(0);" onclick="javascript:if(ck_form(window,document.message_box)){opener.DI_Dialog_new(window,document.message_box,'+target_id+');LeaveSuccess();}">提交</a><span class="Spa_TipsWord" id="error"></span><span id="Spa_LeaveWordNum" class="pull-right">还可以输入360字</span></div></form><div class="Div_DiscussMask"><div id="Div_LeaveMessageSuccess" class="text-center"><p>留言成功</p><span onclick="window.close();">好的</span></div></div></div></body></html>';
	winprops = "width=" + (window.screen.availWidth - 10) + ",height=" + (window.screen.availHeight - 30) + ",top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no";
				
	//检测浏览器版本
	/**editby laizhentao(16-09-08)  新旧版离线留言暂时都用新版样式
	if (is_ie7) {
		h = 303;
		w = 567;
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2 - 20;
		winprops = "height=" + h + ",width=" + w + ",top=" + wint + ",left=" + winl + ",scrollbars=" + scroll + ",resizable=no,toolbar=no,status=no";
		offpage = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" /><title>" + GLS(msg_box_title) + "</title><link href=\"" + xml_path + "/skins/" + skin_path + "/style.css\" rel=\"stylesheet\" type=\"text/css\" /></head><body><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td valign=\"top\"><div id=\"container\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"120\" class=\"leaveWordTitle\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_01.gif\" alt=\"\" width=\"120\" height=\"33\" /></td><td class=\"leaveWordTitle\" width=\"225\">&nbsp;</td><td width=\"15\" class=\"leaveWordTitle\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_02.gif\" alt=\"\" width=\"15\" height=\"33\" /></td></tr></table><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"4\" class=\"frame\"><tr><td class=\"insideFrame\"><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\" cols=\"2\" class=\"buttontable\"><form action=\"\" method=\"post\" name=\"message_box\" id=\"message_box\"><tr align=\"center\"><td align=\"right\" width=\"20%\">" + GLS(meg_box_company_name) + ": </td><td align=\"left\"><input type=\"text\" maxlength=\"120\" title=\"" + GLS(meg_box_company_name) + "\" name=\"company_name\" /><span style=\"color:#ff0000\" id=\"company_name_error\"></span></td></tr><tr align=\"center\"><td align=\"right\" width=\"20%\">" + GLS(msg_box_name) + ": </td><td align=\"left\"><input type=\"text\" maxlength=\"8\" size=\"12\" title=\"" + GLS(msg_box_name) + "\" name=\"true_name\" /><span style=\"color:#ff0000\" id=\"true_name_error\">*</span></td></tr><tr align=\"center\"><td align=\"right\">" + GLS(msg_box_sex) + ": </td><td align=\"left\"><input type=\"radio\" name=\"sex\" checked=\"checked\"value=\"" + GLS(msg_box_sex_boy) + "\" />" + GLS(msg_box_sex_boy) + " <input type=\"radio\" name=\"sex\" value=\"" + GLS(msg_box_sex_girl) + "\" />" + GLS(msg_box_sex_girl) + "</td></tr><tr align=\"center\"><td align=\"right\">" + GLS(msg_box_email) + ": </td><td align=\"left\"><input type=\"text\" title=\"EMAIL\" maxlength=\"120\" name=\"email\" /><span style=\"color:#ff0000\" id=\"email_error\">*</span></td></tr><tr align=\"center\"><td align=\"right\">" + GLS(msg_box_address) + ": </td><td align=\"left\"><input type=\"text\" maxlength=\"60\" title=\"" + GLS(msg_box_address) + "\" name=\"address\" /><span style=\"color:#ff0000\" id=\"address_error\">*</span></td></tr><tr align=\"center\"><td align=\"right\">" + GLS(msg_box_phone) + ": </td><td align=\"left\"><input type=\"text\" title=\"" + GLS(msg_box_phone) + "\" maxlength=\"20\" name=\"phone\" /><span style=\"color:#ff0000\" id=\"phone_error\">*</span></td></tr><tr align=\"center\"><td valign=\"top\" align=\"right\">" + GLS(msg_box_contents) + ": </td><td align=\"left\"><textarea name=\"contents\" title=\"" + GLS(msg_box_contents) + "\" rows=\"3\" cols=\"30\"></textarea><br><span style=\"color:#ff0000\" id=\"contents_error\">*</span></td></tr><tr align=\"right\"><td></td><td align=\"left\" height=\"43\"><img style=\"cursor: pointer;\" src=\"" + xml_path + "/skins/" + skin_path + "/images/" + message_window_img[target_ln][3] + "\" onclick=\"javascript:if(opener.ck_form(window,document.message_box)){opener.DI_Dialog(window,document.message_box," + target_id + ");}\" /></label>&nbsp;&nbsp;<img style=\"cursor:pointer;\" onclick=\"javascript:window.close();\" src=\"" + xml_path + "/skins/" + skin_path + "/images/" + message_window_img[target_ln][1] + "\"/></td></tr></form></table></td></tr></table></div></td><td valign=\"top\"><div id=\"showadarea\" style=\"left:622px; top:0px; width:207px; height:258px; z-index:1;\"><table width=\"207\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"14\" valign=\"top\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_top.gif\" width=\"14\" height=\"18\" alt=\"\" /></td><td><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/right_top.gif\" width=\"193\" height=\"18\" alt=\"\" /></td></tr><tr><td valign=\"top\" background=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_bg.gif\"><br /><br /><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_corner.gif\" width=\"14\" height=\"34\" alt=\"\" /></td><td background=\"" + xml_path + "/skins/" + skin_path + "/images/new/right_bg.gif\"><table width=\"92%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"boxLine\"><tr><td><div id=\"member\"><div id=\"member_demo1\"><div id=\"main\" style=\"overflow:hidden;\"></div></div><div id=\"member_demo2\"></div></div></td></tr></table><div style=\"overflow:hidden; height:5px;\"></div></td></tr><tr><td background=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_bg.gif\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_corner.gif\" width=\"14\" height=\"34\" alt=\"\" /></td><td background=\"" + xml_path + "/skins/" + skin_path + "/images/new/right_bg.gif\"><table width=\"92%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"boxLine\">  <tr><td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"176\" height=\"80\"><tr><td class=\"links_blue\" align=\"center\"><a href=\"http://www.35so.cc\" target=\"_blank\"><font color=\"blue\"><B>" + GLS(search_show) + "</B></font></a></td>  </tr></table></td>  </tr></table></td></tr><tr><td><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/left_bottom.gif\" width=\"14\" height=\"37\" alt=\"\" /></td><td><img src=\"" + xml_path + "/skins/" + skin_path + "/images/new/right_bottom.gif\" width=\"193\" height=\"37\" /></td></tr></table></div></td></tr></table></body></html>";
	}**/
	
	myWindow = window.open("", "tinyWindow" + target_id, winprops);
	myWindow.document.write(offpage);
	myWindow.document.close();
}
function rC(name) {
	var cookieValue = "";
	var search = name + "=";
	if (kDoc.cookie.length > 0) {
		offset = kDoc.cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = kDoc.cookie.indexOf(";", offset);
			if (end == -1) {
				end = kDoc.cookie.length;
			}
			cookieValue = unescape(kDoc.cookie.substring(offset, end));
		}
	}
	return cookieValue;
}
//验证旧版留言页面的样式
function ck_form(win, form) {
	if (form.true_name.value.length <= 0) {
		win.document.getElementById("true_name_error").innerHTML = GLS(msg_box_request_truename);
		win.focus();
		return false;
	} else {
		win.document.getElementById("true_name_error").innerHTML = "*";
	}
	if (form.email.value.length <= 0) {
		win.document.getElementById("email_error").innerHTML = GLS(msg_box_request_email);
		win.focus();
		return false;
	} else {
		val = form.email.value;
		p = val.indexOf("@");
		point = val.indexOf(".");
		if (p < 1 || p == (val.length - 1) || point < 1 || point == (val.length - 1)) {
			win.document.getElementById("email_error").innerHTML = GLS(msg_box_correct_email);
			win.focus();
			return false;
		} else {
			win.document.getElementById("email_error").innerHTML = "*";
		}
	}
	if (form.address.value.length <= 0) {
		win.document.getElementById("address_error").innerHTML = GLS(msg_box_request_address);
		win.focus();
		return false;
	} else {
		win.document.getElementById("address_error").innerHTML = "*";
	}
	if (form.phone.value.length <= 0) {
		win.document.getElementById("phone_error").innerHTML = GLS(msg_box_request_phone);
		win.focus();
		return false;
	} else {
		win.document.getElementById("phone_error").innerHTML = "*";
	}
	if (form.contents.value.length <= 0) {
		win.document.getElementById("contents_error").innerHTML = GLS(msg_box_request_contents);
		win.focus();
		return false;
	} else {
		win.document.getElementById("contents_error").innerHTML = "*";
	}
	return true;
}


function wC(name, value, hours) {
	var expire = "";
	if (hours != null) {
		expire = new Date((new Date()).getTime() + hours * 3600000);
		expire = "; expires=" + expire.toGMTString();
	}
	kDoc.cookie = name + "=" + escape(value) + expire;
}
function GLS(id) {
	if (target_ln == undefined) {
		target_ln = interface_lan;
	}
	return decodeURIComponent(k_lang[target_ln][id]);
}

function fUrl(str) {
	var strs = str;
	if (strs != "") {
		pos = strs.indexOf("/", 8);
		strs = str.substr(7, pos - 7);
		return keC(strs);
	} else {
		return keC("\u76f4\u63a5\u8f93\u5165");
	}
}
function dF(s) {
	var s1 = unescape(s.substr(0, s.length - 1));
	var t = "";
	for (i = 0; i < s1.length; i++) {
		t += String.fromCharCode(s1.charCodeAt(i) - s.substr(s.length - 1, 1));
	}
	document.write(unescape(t));
}
function __getMsg() {
		if (return_window_is_open()) {
			return;
		}
		if (online_user == null || online_user.length <= 0) {
			return;
		}
		var tmp_target_id = "";
		if (online_user != null && online_user.length > 0) {
			for (i = 0; i < online_user.length; i++) {
				tmp_target_id += online_user[i].member_id + ",";
			}
			if (tmp_target_id.indexOf(",") > 0) {
				tmp_target_id = tmp_target_id.substring(0, tmp_target_id.length - 1);
			}
		}
		img__getMsg = new Image();
		img__getMsg.src = xml_path + "/imgCheckAction.do?account_id=" + kacct + "&client_id=" + client_id + "&target_id=" + tmp_target_id + "&.rnd=" + Math.random();
		img__getMsg.onload = function () {
			kheight = img__getMsg.height - 1;
			kaurl = img__getMsg.src.split("&");
				//kaurl = kaurl[1];
			kaurl = kaurl[2];
			kaurl = kaurl.split("=");
			ktarget_id = kaurl[1];
			if (ktarget_id.indexOf(",")) {
				ktarget_id = ktarget_id.split(",");
				ktarget_id = ktarget_id[kheight];
			}
			showDetail(img__getMsg.width, ktarget_id); //type,target_id
		};
	}
//获取浏览器类型
function getBrowser() {
	var browserName = navigator.appName;
	var browserVersion = parseInt(navigator.appVersion);
	var browser = "";
	var ua = navigator.userAgent.toLowerCase();
	var s;
	var os = getOS();
	if (os.indexOf("Android") > -1) {
		//若为手机即设置值
		is_phone = true;
		tagPage = "default_mobile.jsp";
		if (s = ua.match(/firefox\/([\d]+)/)) {
			browser = "Firefox" + s[1];
		} else {
			if (s = ua.match(/chrome\/([\d]+)/)) {
				browser = "Chrome" + s[1];
			} else {
				if (s = ua.match(/opera.([\d]+)/)) {
					browser = "Opera" + s[1];
				} else {
					if (s = ua.match(/sogoumobilebrowser/)) {
						browser = "Sougou";
					} else {
						if (s = ua.match(/360browser/)) {
							browser = "360";
						} else {
							if (s = ua.match(/ucbrowser/)) {
								browser = "Uc";
							} else {
								if (s = ua.match(/micromessenger/)) {
									browser = "WeiXin";
								} else {
									if (s = ua.match(/yixin/)) {
										browser = "YiXin";
									} else {
										if (s = ua.match(/weibo/)) {
											browser = "XinLang";
										} else {
											if (s = ua.match(/baiduboxapp/)) {
												browser = "BaiDuApp";
											} else {
												if (s = ua.match(/webkit/)) {
													browser = "WebKit";
												} else {
													browser = "unknow";
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		return browser;
	}
	if (os.indexOf("iPhone") > -1 || os.indexOf("iPad") > -1) {
		//若为手机即设置值
		is_phone = true;
		tagPage = "default_mobile.jsp";
		if (s = ua.match(/firefox\/([\d]+)/)) {
			browser = "Firefox" + s[1];
		} else {
			if (s = ua.match(/chrome\/([\d]+)/)) {
				browser = "Chrome" + s[1];
			} else {
				if (s = ua.match(/opera.([\d]+)/)) {
					browser = "Opera" + s[1];
				} else {
					if (s = ua.match(/version\/([\d]+).*safari/)) {
						browser = "Safari" + s[1];
					} else {
						if (s = ua.match(/crios/)) {
							browser = "Chrome" + s[1];
						} else {
							if (s = ua.match(/mqqbrowser/)) {
								browser = "QQ" + s[1];
							} else {
								if (s = ua.match(/lbkit/)) {
									browser = "Liebao" + s[1];
								} else {
									if (s = ua.match(/ucbrowser/)) {
										browser = "Uc";
									} else {
										if (s = ua.match(/micromessenger/)) {
											browser = "WeiXin";
										} else {
											if (s = ua.match(/yixin/)) {
												browser = "YiXin";
											} else {
												if (s = ua.match(/weibo/)) {
													browser = "XinLang";
												} else {
													if (s = ua.match(/baiduboxapp/)) {
														browser = "BaiDuApp";
													} else {
														browser = "unknow";
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		return browser;
	}
	if (s = ua.match(/msie ([\d]+)/)) {
		browser = "IE" + s[1];
	} else {
		if (ua.indexOf("Trident") > -1 && ua.indexOf("rv:11") > -1) {
			browser = "IE11";
		} else {
			if (s = ua.match(/firefox\/([\d]+)/)) {
				browser = "Firefox" + s[1];
			} else {
				if (s = ua.match(/chrome\/([\d]+)/)) {
					browser = "Chrome" + s[1];
				} else {
					if (s = ua.match(/opera.([\d]+)/)) {
						browser = "Opera" + s[1];
					} else {
						if (s = ua.match(/version\/([\d]+).*safari/)) {
							browser = "Safari" + s[1];
						} else {
							browser = "unknow";
						}
					}
				}
			}
		}
	}
	return browser;
}

					
//获取系统类型
function getOS() {
	var strResult;
	var appVersion = navigator.appVersion;
	if (navigator.userAgent.match(/(Firefox)/)) {
		appVersion = navigator.oscpu;
	}
	var strPara = appVersion.match(/Windows NT\s([\d]..)/);
	if (strPara && strPara.length > 0) {
		switch (strPara[0]) {
		  case "Windows NT 5.1":
			strResult = "Windows XP";
			break;
		  case "Windows NT 5.2":
			strResult = "Windows Server 2003";
			break;
		  case "Windows NT 6.0":
			strResult = "Windows Vista";
			break;
		  case "Windows NT 6.1":
			strResult = "Windows 7";
			break;
		  case "Windows NT 6.2":
			strResult = "Windows 8";
			break;
		  default:
			strResult = "unknow";
			break;
		}
	} else {
		strPara = appVersion.match(/Mac\sOS\sX\s\w*/);
		if (strPara && strPara.length > 0) {
			strResult = strPara[0].replace(new RegExp(/(_)/g), ".");
		} else {
			strPara = appVersion.match(/Android.\d.\d/);
			if (strPara && strPara.length > 0) {
				strResult = strPara[0].replace(/\//, " ");
			} else {
				strPara = appVersion.match(/iPhone\sOS\s\w{3}/);
				if (strPara && strPara.length > 0) {
					strResult = strPara[0].replace(new RegExp(/(_)/g), ".");
				} else {
					strPara = appVersion.match(/Windows\sPhone\s\d.\d/);
					if (strPara && strPara.length > 0) {
						strResult = strPara;
					} else {
						strPara = appVersion.match(/Linux/);
						if (strPara && strPara.length > 0) {
							strResult = strPara;
						} else {
							strPara = appVersion.match(/iPad/);
							if (strPara && strPara.length > 0) {
								var iosVersion = appVersion.match(/OS\s\w{3}/)[0].replace(new RegExp(/(_)/g), ".");
								strResult = strPara + " " + iosVersion;
							} else {
								strResult = "unknow";
							}
						}
					}
				}
			}
		}
	}
	return strResult;
}

//检测浏览器版本
if (getBrowser().indexOf("IE") >= 0) {
	if (8 > parseInt(getBrowser().substring(getBrowser().indexOf("E") + 1, getBrowser().length))) {
		tagPage = "index.jsp";
		is_ie7 = true;
	}
}
//解码-----begin
function decodeStr(str){
	str = decodeURIComponent(str);
	re = /\+/g;
	str = str.replace(re," ");
	return str;
}
//解码-----end
//去除空格
String.prototype.trim=function(){
　　 return this.replace(/(^\s*)|(\s*$)/g, "");
　　 }

//初始化
function js_init(c_accountId, ln) {
	if (ln == null) {
		ln = 0;
	}
	kacct = c_accountId;
	//interface_lan = ln;
	this.c_accountId = kacct;
	if (c_accountId != null) {
		///gradeAction.do/xml_com_grade_cn.jsp
		if(isIe){
			//只能用GET
			loadXMLDocToIE(xml_path + "/gradeAction.do?c=" + c_accountId + "&ln=" + ln + "&vno=" + v_vno, p__show_com_info);
		}else{
			loadXMLDoc(xml_path + "/gradeAction.do?c=" + c_accountId + "&ln=" + ln + "&vno=" + v_vno, get_data, "GET", null);
		}
	}
}

//获取设置表数据-----begin
function get_data() {

	if (req.readyState == 4) {
		if (req.status == 200) {
			p__show_com_info();
		} else {
			//fnErrorTrap("get_data", xml_path + "/gradeAction.do", req.statusText);
			//on_error("get_data", req.statusText);
		}
	}
}

function p__show_com_info() {
	var gitems;
	var uitems;
	if(!isIe){
		if (req.responseXML == null) {
			return;
		}
		gitems = req.responseXML.getElementsByTagName("grade");
		uitems = req.responseXML.getElementsByTagName("user");
	}else{
		gitems = toXmlDom(req.responseText).getElementsByTagName("grade");
		uitems = toXmlDom(req.responseText).getElementsByTagName("user");
	}
	if (gitems.length > 0) {
		for (i = 0; i < gitems.length; i++) {
			encode_str_s = getElementTextNS("", "encode_str_s", gitems[i], 0);
			faq_count = getElementTextNS("", "faq_count", gitems[i], 0);
			online_pic = getElementTextNS("", "online_pic", gitems[i], 0);
			offline_pic = getElementTextNS("", "offline_pic", gitems[i], 0);
			visiter_ip = getElementTextNS("", "visiter_ip", gitems[i], 0);
			pos = getElementTextNS("", "pos", gitems[i], 0);
			im_skin = getElementTextNS("", "im_skin", gitems[i], 0);
			im_style = getElementTextNS("", "im_style", gitems[i], 0);
			kDef_opt = getElementTextNS("", "kDef_opt", gitems[i], 0);
			blandhost = getElementTextNS("", "blandhost", gitems[i], 0);
			faq_count = getElementTextNS("", "faq_count", gitems[i], 0);
			offsetH = getElementTextNS("", "offsetH", gitems[i], 0);
			is_show_ssi = getElementTextNS("", "is_show_ssi", gitems[i], 0);
			new_imstyle = getElementTextNS("", "newstyle", gitems[i], 0);
			newpic = getElementTextNS("", "newpic_two", gitems[i], 0);
			newcolor = getElementTextNS("", "newcolor", gitems[i], 0);
			end_date_flag = getElementTextNS("", "end_date", gitems[i], 0);
			round_cliend_id = getElementTextNS("", "cliendid", gitems[i], 0);
			newonline_pic = getElementTextNS("", "newonline_pic", gitems[i], 0);
			newoffline_pic = getElementTextNS("", "newoffline_pic", gitems[i], 0);
			newpos = getElementTextNS("", "newpos", gitems[i], 0);
			newoffseth = getElementTextNS("", "newoffseth", gitems[i], 0);
			fixed_three = getElementTextNS("", "fixed_three", gitems[i], 0);
			fixed_two = getElementTextNS("", "fixed_two", gitems[i], 0);
			fixed_one = getElementTextNS("", "fixed_one", gitems[i], 0);
			use_wltversion = getElementTextNS("", "use_wltversion", gitems[i], 0);
		}
	} else {
		fnErrorTrap("get_info", xml_path + "/gradeAction.do", req.statusText);
		//on_error("get_info", req.statusText);
	}
	if(use_wltversion != null && use_wltversion == 1){
		is_ie7 = true;
		//只要是旧版都是用旧版聊天框(暂未开启)
		//tagPage = "index.jsp";
	}
	//若不是IE7则为新版(若为0,3两个样式会执行旧版样式)
	if(!is_ie7){
		if(new_imstyle == 3 || is_phone){
			im_style = 3;
		}else{
			im_style = 5;
		}
		offsetH = newoffseth;
		pos = newpos;
	}
	
	if (uitems.length > 0) {
			var user;
		for (i = 0; i < uitems.length; i++) {
			user = new kimUser();
			user.status = getElementTextNS("", "status", uitems[i], 0);
			user.member_id = getElementTextNS("", "member_id", uitems[i], 0);
			user.net_name = decodeStr(getElementTextNS("", "net_name", uitems[i], 0));
			user.kacct = getElementTextNS("", "kacct", uitems[i], 0);
			user.sign_name = decodeStr(getElementTextNS("", "sign_name", uitems[i], 0));
			user.clients_num = getElementTextNS("", "clients_num", uitems[i], 0);
			user.uLevel = getElementTextNS("", "uLevel", uitems[i], 0);
			all_user_list.push(user);
		}
	} else {
		fnErrorTrap("get_info", xml_path + "/gradeAction.do", req.statusText);
		//on_error("get_info", req.statusText);
	}
	is_finish_get = true;
	//初始化所有数据后执行方法
	core();
}


//将string数据转换成xml
 function toXmlDom(source){  
    var xmlDoc = null;  
    if (window.ActiveXObject) {  
        var ARR_ACTIVEX = ["MSXML4.DOMDocument","MSXML3.DOMDocument","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XmlDom"];  
        var XmlDomflag = false;  
        for (var i = 0;i < ARR_ACTIVEX.length && !XmlDomflag ;i++) {  
            try {  
                var objXML = new ActiveXObject(ARR_ACTIVEX[i]);  
                xmlDoc = objXML;  
                XmlDomflag = true;  
            } catch (e) {  
            }  
        }  
        if (xmlDoc) {    
            xmlDoc.async = false;  
            xmlDoc.loadXML(source);  
        }  
    }else{  
   var parser=new DOMParser();  
   var xmlDoc=parser.parseFromString(source,"text/xml");  
 }  
    return xmlDoc;  
} 
//将string数据转换成xml
//获取设置表数据-----end

var __charset;
if (interface_lan == null) {
	if (isIe) {
		__charset = kDoc.charset;
	} else {
		__charset = kDoc.characterSet;
	}
	if (isIe) {
		__charset = __charset.toLowerCase();
	}
	var _SC_ = 0;
	var _TC_ = 1;
	var _EN_ = 2;
	if (__charset == "gb2312" || __charset == "gbk" || __charset == "GB2312" || __charset == "GBK") {
		target_ln = _SC_;
	} else {
		if (__charset == "big5" || __charset == "Big5") {
			target_ln = _TC_;
		} else {
			if (__charset == "utf-8" || __charset == "UTF-8") {
				target_ln = _SC_;
			} else {
				target_ln = _EN_;
			}
		}
	}
} else {
	target_ln = interface_lan;
}
//创建一个对象存储客户数据----begin
function kimUser() {
	var status;
	var member_id;
	var net_name;
	var kacct;
	var sign_name;
	var clients_num;
	var uLevel;
	this.is_online = function () {
		if (this.status == 1 || this.status == 3 || this.status == 4) {
			return true;
		}
		return false;
	};
	this.is_admin = function () {
		return this.uLevel > 0 ? true : false;
	};
}
//创建一个对象存储客户数据---end
var online_user_timer;
var floters_time;
var has_online_operator = false;
var admin_target_id;
//悬浮框初始化----core begin
function core() {
	if (new_imstyle == null || new_imstyle < 0) {
		new_imstyle = 1;
	}
	
	//初始化新版样式
	if (!is_ie7) {
		var im_images = "" + xml_path + "/images/Template_"+fixed_two+"_1."+(fixed_two==1?'gif':'png');
		//newpic = '201504/14/1429002138329724.png';
		if(interface_lan==2){
			im_images = "" + xml_path + "/images/Template_"+fixed_two+"_1_en."+(fixed_two==1?'gif':'png');
		}
		if (newpic != null && newpic.length > 0 && new_imstyle == 2) {
			im_images = "http://" + wlt_path + "/db_picture/" + newpic;
		}
		
		//根据模板颜色改变颜色
		if((newcolor == null || newcolor.length == 0) && ((new_imstyle == 2 && fixed_two==2) || (new_imstyle == 1 && fixed_one==2))){
			newcolor = "#1ACB44";
		}else if((newcolor == null || newcolor.length == 0) && ((new_imstyle == 2 && fixed_two==3) || (new_imstyle == 1 && fixed_one==3))){
			newcolor = "#F33";
		}
		
	  	//背景色
		if (newcolor != null && newcolor.length > 0) {
			KenFor_WangLingTong_ListContent_style = "style=\"border:1px solid " + newcolor + "\"";
			KenFor_WangLingTong_WebSite_style = "style=\"background: " + newcolor + ";\"";
			KenFor_WangLingTong_ListTitle_style = "style=\"background: " + newcolor + ";\"";
			wanglingtong_list_style = "style=\"color:" + newcolor + "\"";
			
		}
		
		
	}

	

	if (im_skin == null || im_skin > 6) {
		im_skin = 0;
	}
	skin_path = skinslib[im_skin];
	var offsetW = "document.body.clientWidth-110";
	var wltWinWidth = 110;
	if (im_style == 5) {
		offsetW = "document.body.clientWidth-153";
		wltWinWidth = 153;
	}
	if (offsetH == null) {
		offsetH = 130;
	}
	var winH = 20;
	var winW = 107;
	if (pos == "left") {
		offsetW = 1;
	}
//pos = "right";
   //pos = 'left';
	var status = true;
	var visiter1;
	
//var visiter_ip;
	var login_status;
	
	var is_show = false;
	var is_loading = false;
//var kacct;
	var sent_pc = false;
	if (this_url.indexOf("asker=kim") > -1) {
		this_referr = "%E7%BD%91%E8%81%86%E9%80%9A";
	}
	//var im_skin;
//var im_style;
	
	if (im_style == null || im_style < 0) {
		im_style = 1;
	}
	
	
	if (im_style == 0 || im_style == 3||im_style == 1||im_style == 2||im_style == 5) {
		//kDoc.write("<div id='kim_area'></div>");
		var div=document.createElement("div");
		div.id = 'kim_area';
		//div.style = "position: fixed;top: 50px;";
		if(offsetH<0){
			offsetH=0;
		}
		div.style.cssText = "position: fixed;top: "+offsetH+"px;"+pos+":0;Z-INDEX:6000;";
		toBody.appendChild(div);
	}
	
	var objDiv;
	var over = false;
	var my_content;
	var my_x;
	var my_y;
	var my_id;
	function __floaters() {
		this.items = new Array();
		this.addItem = function (id, x, y, content) {
			my_id = id;
			my_x = x;
			my_y = y;
			my_content = content;
			var div_obj = getObj("float_win");
			if (div_obj == null) {
				div_obj = makeObj("div");
				div_obj.id = "float_win";
			}
			var btnTogglContent_right = "";
			var btnTogglContent_left = "";
					//linbaoji 
			if (im_style == 5) {
				var isonline = online_user.length > 0 ? "line" : "noline";
				var btnImage = xml_path + "/images/wlt_" + pos + "_" + target_ln + "_" + isonline + ".png";
				var btnTogglContent_left = "<span id=\"divWltOnLineBtn\" style=\"Z-INDEX: 9899;WIDTH:45px;FLOAT:left;HEIGHT:145px;BACKGROUND:url(" + btnImage + ")no-repeat;" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src='" + btnImage + "', sizingMethod='scale');\"></span>";
				if (pos == "right") {//pos == right 
					btnTogglContent_right = btnTogglContent_left;
					btnTogglContent_left = "";
				}
			}
			div_obj.innerHTML = "<DIV id=" + id + "  style=\"Z-INDEX: 8899;POSITION: absolute;overflow:hidden; width:" + wltWinWidth + "px; height:auto;left:" + (typeof (x) == "string" ? eval(x) : x) + "px" + ";top:" + (typeof (y) == "string" ? eval(y) : y) + "px" + "\">" + "<div id=\"float_win_innerDiv\" id=\"float_win_innerDiv\" style=\"width:" + wltWinWidth + "px; height:auto;\">" + btnTogglContent_right + content + btnTogglContent_left + "</div></DIV>";
					
					//kDoc.body.appendChild(div_obj);
			toBody.appendChild(div_obj);
			var newItem = {};
			newItem.object = getObj(id);
			newItem.x = x;
			newItem.y = y;
			this.items[this.items.length] = newItem;
		};
		this.new_addItem = function (id, x, y, content) {
			my_id = id;
			my_x = x;
			my_y = y;
			my_content = content;
			var div_obj = getObj("KenFor_WangLingTong");
			if (div_obj == null) {
				div_obj = makeObj("div");
				div_obj.id = "KenFor_WangLingTong";
				//决定使用的样式
				div_obj.setAttribute("data-KenForWangLingTongTemplate", 1);
			}
			var flow_win_play = '';
			var flow_win_img = "";
			//若为第一种样式则去掉滑动方法
			if(new_imstyle == 2){
				//flow_win_play = 'onmouseover=\"WangLingTong_ListShow(this);\" onmouseout=\"WangLingTong_ListHide(this);\"';
				flow_win_play = 'onmouseover=\"WangLingTong_ListShow();\" onmouseout=\"WangLingTong_ListHide();\"';
				flow_win_img = "<div id=\"KenFor_WangLingTong_Breviary\" class=\"KenFor_WangLingTong_Breviary\" ><img alt=\"\u5ba2\u670d\u4e2d\u5fc3\" src=" + "\"" + im_images + "\"" + "/></div>";
			}
			//新版窗口垂直位置不能超出边界
			if(offsetH<0){
				offsetH=0;
			}
			div_obj.innerHTML = "<div id=\"KenFor_WangLingTong_Body\" class=\"KenFor_WangLingTong_Body\" "+flow_win_play+" data-KenForWangLingTongFloat=" + "\"" + pos + "\"" + "  style=\"top:" + "" + offsetH + "" + "px;\"> "+flow_win_img+"" + my_content + "</div>" + "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + xml_path + "/css/KenFor_WangLingTong.css\" />";	
					//输出
					
					//kDoc.body.appendChild(div_obj);
			toBody.appendChild(div_obj);
			/*
			if(new_imstyle == 2){
						if(document.getElementById("KenFor_WangLingTong_List").offsetHeight>=document.getElementById("KenFor_WangLingTong_Breviary").offsetHeight){
						    document.getElementById("KenFor_WangLingTong_Body").style.height = document.getElementById("KenFor_WangLingTong_List").offsetHeight + 'px';
						}
						else{
						    document.getElementById("KenFor_WangLingTong_Body").style.height = document.getElementById("KenFor_WangLingTong_Breviary").offsetHeight + 'px';
						}
					}*/
					
		};
		this.__play = function () {
			__collection = this.items;
			dT(floters_time);
			floters_time = sT("__play()", 40);
		};
	}
	var title_count = 0;
	var Kfr = new Array("__floaters", "kim_msgN_floaters");
	var Kid;
	function MouseDown(e) {
		if (over) {
			if (isMozilla) {
				Kid = e.target.id;
				objDiv = getObj(Kfr[Kid]);
				if (objDiv != null) {
					X = e.layerX;
					Y = e.layerY;
					return false;
				}
				return false;
			} else {
				Kid = event.srcElement.id;
				objDiv = getObj(Kfr[Kid]);
				if (objDiv != null) {
					objDiv = objDiv.style;
					X = event.offsetX;
					Y = event.offsetY;
				}
			}
		}
	}
	function MouseMove(e) {
		if (objDiv) {
			var Tobj = Kid == 0 ? __collection : kim_notice_collection;
			var vHeight = kDoc.documentElement.clientHeight != 0 ? kDoc.documentElement.clientHeight : kDoc.body.clientHeight;
			var vWidth = kDoc.documentElement.clientWidth != 0 ? kDoc.documentElement.clientWidth : kDoc.body.clientWidth;
			var vtocHeight = Tobj[0].object.childNodes[0].offsetHeight;
			var vtocWidth = Tobj[0].object.childNodes[0].offsetWidth;
			var v_top;
			var v_left;
			if (isMozilla) {
				if (e.pageY - Y + vtocHeight > vHeight + kDoc.body.scrollTop + kDoc.documentElement.scrollTop) {
					v_top = (vHeight + kDoc.body.scrollTop + kDoc.documentElement.scrollTop - vtocHeight);
				} else {
					if (e.pageY - Y < 0) {
						v_top = 0;
					} else {
						v_top = (e.pageY - Y);
					}
				}
				if (e.pageX - X + vtocWidth > vWidth) {
					v_left = (vWidth + kDoc.body.scrollLeft - vtocWidth);
				} else {
					if (e.pageX - X < 0) {
						v_left = 0;
					} else {
						v_left = (e.pageX - X);
					}
				}
				objDiv.style.top = v_top + "px";
				objDiv.style.left = v_left + "px";
				for (var i = 0; i < Tobj.length; i++) {
					Tobj[i].y = v_top;
					Tobj[i].x = v_left;
				}
			} else {
				if (event.clientY - Y + vtocHeight > vHeight) {
					objDiv.pixelTop = vHeight + kDoc.documentElement.scrollTop - vtocHeight;
				} else {
					if (kDoc.body.scrollTop == 0 && kDoc.documentElement.scrollTop >= 0) {
						objDiv.pixelTop = event.clientY - Y + kDoc.documentElement.scrollTop;
						if (objDiv.pixelTop < kDoc.documentElement.scrollTop) {
							objDiv.pixelTop = kDoc.documentElement.scrollTop;
						}
					} else {
						objDiv.pixelTop = event.clientY - Y + kDoc.body.scrollTop;
						if (objDiv.pixelTop < kDoc.body.scrollTop) {
							objDiv.pixelTop = kDoc.body.scrollTop;
						}
					}
				}
				if (event.clientX - X + vtocWidth > vWidth) {
					objDiv.pixelLeft = vWidth + kDoc.documentElement.scrollLeft - vtocWidth;
				} else {
					if (kDoc.body.scrollLeft == 0 && kDoc.documentElement.scrollLeft >= 0) {
						objDiv.pixelLeft = event.clientX - X + kDoc.documentElement.scrollLeft;
						if (objDiv.pixelLeft < kDoc.documentElement.scrollLeft) {
							objDiv.pixelLeft = kDoc.documentElement.scrollLeft;
						}
					} else {
						objDiv.pixelLeft = event.clientX - X + kDoc.body.scrollLeft;
						if (objDiv.pixelLeft < kDoc.body.scrollLeft) {
							objDiv.pixelLeft = kDoc.body.scrollLeft;
						}
					}
				}
				for (var i = 0; i < Tobj.length; i++) {
					if (event.clientX - X + vtocWidth > vWidth) {
						Tobj[i].x = vWidth - vtocWidth//+kDoc.documentElement.scrollLeft;
					} else {
						Tobj[i].x = event.clientX - X;
					}
					if (event.clientY - Y + vtocHeight > vHeight) {
						Tobj[i].y = vHeight - vtocHeight//+kDoc.documentElement.scrollTop;
					} else {
						Tobj[i].y = event.clientY - Y;
					}
				}
			}
			return false;
		}
	}
	function MouseUp() {
		objDiv = null;
	}
	function drop_init() {
		if (im_style == 5) {
			return false;
		}
		isMozilla = (kDoc.all) ? 0 : 1;
		if (isMozilla) {
			kDoc.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
		}
		kDoc.onmousedown = MouseDown;
		try {
			var mousemove_default = kDoc.onmousemove;
			function new_mousemove(e) {
				try {
					if (mousemove_default != null && typeof (mousemove_default) == "function") {
						mousemove_default();
					}
					MouseMove(e);
				}
				catch (e) {
					window.stauts = e.message;
					MouseMove(e);
				}
			}
			kDoc.onmousemove = new_mousemove;
		}
		catch (e) {
			MouseMove(window.event);
			window.stauts = e.message;
		}
//				kDoc.onmousemove = MouseMove;
		kDoc.onmouseup = MouseUp;
			//	buildDimmerDiv();
	}
	drop_init();
	function _floters_it(str) {
		var the__floaters = new __floaters();
		var content = "";
		if (is_ie7) {
			content = "<table style=\"FLOAT: left;font-size: 12px;text-align: left;background-color:transparent;border: 0px none;line-height: 15px;word-spacing: 0px;letter-spacing: 0px;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><table style=\"font-size: 12px;text-align: left;background-color:transparent;border: 0px none;line-height: 15px;word-spacing: 0px;letter-spacing: 0px;\" width=\"100%\" border=\"0\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"TABLE-LAYOUT: fixed; WORD-BREAK: break-all\"><table style=\"font-size: 12px;text-align: left;background-color:transparent;border: 0px none;line-height: 15px;word-spacing: 0px;letter-spacing: 0px;\" width=\"107\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\"><tr><td ondblclick=\"void(0);\" onmouseover=\"over=true;\" onmouseout=\"over=false;\" style=\"" + (im_style == 5 ? "" : "cursor:move;") + "\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/side_top.gif\" alt=\"\" id=\"0\" width=\"107\" height=\"27\" border=\"0\" usemap=\"#kimMap\" /></td>  </tr><tr><td valign=\"top\" background=\"" + xml_path + "/skins/" + skin_path + "/images/side_bg.gif\"><table id=\"table_content\" width=\"90%\" border=\"0\" align=\"center\" cellpadding=\"1\" cellspacing=\"1\" bgcolor=\"#B4B9C9\"><tr><td bgcolor=\"#ffffff\"><table style=\"font-size: 12px;text-align: left;background-color:transparent;border: 0px none;line-height: 15px;word-spacing: 0px;letter-spacing: 0px;\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">    <tr>      <td align=\"center\" style=\"background:" + skinscss[im_skin] + "; line-height:140%; color:#ffffff; font-size:12px; padding-left:3px;\">" + GLS(list_tips) + "</td>    </tr>  </table><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"1\" cellspacing=\"0\">" + str + "</table></td></tr></table></td></tr><tr><td><a href=\"http://wlt.kenfor.com\" target=\"_blank\"><img border=\"0\" src=\"" + xml_path + "/skins/" + skin_path + "/images/side_bottom.gif\" alt=\"POWERED BY KENFOR\" width=\"107\" height=\"19\" /></a></td></tr></table><MAP id=\"kimMap\" name=\"kimMap\"><AREA shape=\"RECT\" id=\"area_close\" alt=\"" + GLS(message_window_close) + "\" coords=\"80,0,99,12\" href='javascript:kim_close_f(\"__floaters\");'></MAP></td></tr></table></td></tr></table>";
			the__floaters.addItem("__floaters", offsetW, "offsetH", content);
		} else {
			//新版
			var pos_lock  = "-142px;";
			if(new_imstyle == 1){
				pos_lock  = "-3px;";
			}
			content = "<div id=\"KenFor_WangLingTong_List\" class=\"KenFor_WangLingTong_List\"  style=\"" + "" + pos + "" + ": "+pos_lock+"\">" + str + "</div>";
			the__floaters.new_addItem("__floaters", offsetW, "offsetH", content);
		}
		the__floaters.__play();
	}
	function _floters_it_2(str) {
		var the__floaters = new __floaters();
		the__floaters.addItem("__floaters_a", offsetW, "offsetH", str);
		the__floaters.__play();
	}

	
	
	
	var isIE = window.attachEvent == undefined ? false : true;
	var req;
	var init_flag = false;
	

	function validataNumber(str) {
		if (str.length == 0) {
			return false;
		}
		var patn = /^[0-9-\/]+$/;
		if (!patn.test(str)) {
			return false;
		}
		return true;
	}
	//初始化悬浮框的入口----------begin
	function new_init() {
		client_id = rC("my_client_id_" + kacct);
		if (!validataNumber(client_id) || client_id == "undefined" || client_id == null || client_id.length <= 0) {
			if (client_id == null || client_id == "=975205232") {
				wC("my_client_id_" + c_accountId, round_cliend_id, 24);
			}
		
			p_Klogin(round_cliend_id);
		} else {
			p_Klogin(client_id);
		}
				//用户习惯插入数据库
		_do_save_client();
	}
	//初始化悬浮框的入口----------end
	function p_Klogin(id) {
		client_id = id;
		login_status = 1;
		if (login_status > 0 && client_id.length > 0) {
			wC("my_client_id_" + kacct, client_id, 24 * 30 * 12);
			____init();
		}
	}
	
	function getDomain() {
		host = this_url;
		if (host.indexOf("//") > -1) {
			host = host.split("//");
			if (host[1].indexOf("/") > -1) {
				host = host[1].split("/")[0];
				return host;
			} else {
				return host;
			}
		} else {
			return host;
		}
	}
	var autopop;
	var show_search;
	function ____init() {
		status = true;
		if (encode_str_s == undefined) {
			return;
		}
		decode_strArray = decode_str(dict, encode_str_s);
		decode_strArray = decode_strArray.split(",");
		member_grade_id = decode_strArray[0];
		is_save_track = decode_strArray[1];
		is_active = decode_strArray[2];
		is_website = decode_strArray[3];
		opt_num = decode_strArray[4];
		is_save_msg = decode_strArray[5];
		grade_id = decode_strArray[6];
		end_date = decode_strArray[7];
		lang = decode_strArray[8];
		//target_ln = kim_check(lang);
		average = decode_strArray[9];
		max_visitor = decode_strArray[10];
		autopop = decode_strArray[11] > 0 ? true : false;
		waitting = decode_strArray[12];
		show_search = decode_strArray[13];
		if (average > 0) {
			is_average = true;
		}
		visiter_ips = visiter_ip.split(".");
		visiter = eval(visiter_ips[3]) + eval(visiter_ips[2] * 256) + eval(visiter_ips[1] * (256 * 256)) + eval(visiter_ips[0] * (256 * 256 * 256));
		/*
				if(!_dochkdate(end_date)){
			     // _floters_it(GLS(member_expired));
					return;
				}*/
		if (blandhost != "null" && blandhost != "NULL" && blandhost != "") {
			kHost = getDomain();
			isHost = false;
			blandhosts = blandhost.split(";");
			for (ki = 0; ki < blandhosts.length; ki++) {
				if (blandhosts[ki] == kHost) {
					isHost = true;
				}
			}
			if (!isHost) {
				return;
			}
		}
		if (is_website > 0) {
			p_get_online_user();
			if (is_ie7) {
				if (im_style == 5) {
					InterTime = 20;
					numInter = 8;
					BigTimeoutHandle = null;
					SmallTimeoutHandle = null;
					BigInter = null;
					SmallInter = null;
					if (pos == "left") {
						v_float_win = getObj("float_win");
						v_float_win_i = parseInt(v_float_win.style.left);
						maxWidth = -3;
						minWidth = -104;
						Big = function () {
							if (parseInt(v_float_win.style.left) < maxWidth) {
								getObj("divWltOnLineBtn").style.display = "none";
								v_float_win_i = parseInt(v_float_win.style.left);
								v_float_win_i += numInter;
								v_float_win.style.left = v_float_win_i + "px";
								if (v_float_win_i == maxWidth) {
									clearInterval(BigInter);
								}
							}
						};
						Small = function () {
							if (parseInt(v_float_win.style.left) > minWidth) {
								v_float_win_i = parseInt(v_float_win.style.left);
								v_float_win_i -= numInter;
								v_float_win.style.left = v_float_win_i + "px";
								if (v_float_win_i == minWidth) {
									clearInterval(SmallInter);
								}
								getObj("divWltOnLineBtn").style.display = "block";
							}
						};
						float_win_init = function (id, _top, _left) {
							var me = id.charAt ? getObj(id) : id, d1 = document.body, d2 = document.documentElement;
												//d1.style.height=d2.style.height='100%';
							me.style.top = _top ? _top + "px" : 0;
							me.style.left = _left + "px";
												//[(_left>0?'left':'left')]=_left?Math.abs(_left)+'px':0;
							me.style.position = "absolute";
						
												//setInterval(function (){me.style.top=parseInt(me.style.top)+(Math.max(d1.scrollTop,d2.scrollTop)+_top-parseInt(me.style.top))*0.1+'px';},10+parseInt(Math.random()*20));
							return arguments.callee;
						};
						float_win_init("float_win", 50, -108);
					} else {
						v_float_win = getObj("float_win_innerDiv");
						v_float_win_i = parseInt(v_float_win.style.paddingLeft);
						maxWidth = 44;
						minWidth = 106;
						Big = function () {
							if (parseInt(v_float_win.style.marginLeft) > maxWidth) {
								getObj("divWltOnLineBtn").style.display = "none";
								v_float_win_i = parseInt(v_float_win.style.marginLeft);
								v_float_win_i -= numInter;
								try {
									v_float_win.style.marginLeft = v_float_win_i + "px";
								}
								catch (ee) {
									v_float_win.style.marginLeft = "0px";
								}
								if (v_float_win_i <= maxWidth) {
									clearInterval(BigInter);
								}
													//getObj('divWltOnLineBtn').style.height='0px';
							}
						};
						Small = function () {
							if (parseInt(v_float_win.style.marginLeft) < minWidth) {
								v_float_win_i = parseInt(v_float_win.style.marginLeft);
								v_float_win_i += numInter;
								v_float_win.style.marginLeft = v_float_win_i + "px";
								if (v_float_win_i >= minWidth) {
									clearInterval(SmallInter);
								}													
													//getObj('divWltOnLineBtn').style.height='140px';
								getObj("divWltOnLineBtn").style.display = "block";
							}
						};
						float_win_init = function (id, _top, _left) {
							var me = id.charAt ? getObj(id) : id, d1 = document.body, d2 = document.documentElement;
							me = document.getElementById("float_win_innerDiv");
											//d1.style.height=d2.style.height='100%';
											//me.style.top=_top?_top+'px':0;
							me.style.marginLeft = _left + "px";
											//[(_left>0?'left':'left')]=_left?Math.abs(_left)+'px':0;
											//me.style.position='absolute';
							return arguments.callee;
						};
						float_win_init("float_win", 0, 108);
					}//end if
					toBig = function () {
						clearInterval(SmallInter);
						clearInterval(BigInter);
						BigInter = setInterval(Big, InterTime);
					};
					toSmall = function () {
						clearInterval(SmallInter);
						clearInterval(BigInter);
						SmallInter = setInterval(Small, InterTime);
					};
					v_float_win.onmouseover = toBig;
					v_float_win.onmouseout = toSmall;
				}//end if(im_style == 5;)
			}
		}
		if (is_save_track > 0) {
			
			if(this_referr.indexOf("QQ") != -1 || this_referr.indexOf("qq") != -1 || this_referr.indexOf("89529277") != -1){
				
				return ;
			}
			_do_save_track(visiter);
		}
		if (is_active > 0) {
			_getMsg();
		}
	}
	function kim_check(lang) {
		if (lang.substring(lang.length - (interface_lan + 1), lang.length - interface_lan) > 0) {
			return interface_lan;
		} else {
			len = lang.length;
			var lan = 0;
			for (i = 0; i < len; i++) {
				if (lang.substring(lang.length - (i + 1), len - i) > 0) {
					return i;
				}
			}
		}
	}
	h = _ur.substring(i + 3, _ur.length);
	if (h.indexOf("/") > -1) {
		h = h.substring(0, h.indexOf("/"));
	}
	for (var ii = 0; ii < k_uOsr.length; ii++) {
		if (h.toLowerCase().indexOf(k_uOsr[ii].toLowerCase()) > -1) {
			if ((i = _ur.indexOf("?" + k_uOkw[ii] + "=")) > -1 || (i = _ur.indexOf("&" + k_uOkw[ii] + "=")) > -1 || (i = _ur.indexOf("#" + k_uOkw[ii] + "=")) > -1) {
				k = _ur.substring(i + k_uOkw[ii].length + 2, _ur.length);
				if ((i = k.indexOf("&")) > -1) {
					k = k.substring(0, i);
				}
				for (var yy = 0; yy < k_uOno.length; yy++) {
					if (k_uOno[yy].toLowerCase() == k.toLowerCase()) {
						_ufno = 1;
						break;
					}
				}
				if (t) {
					return k_uEC(k);
				} else {
					return escape(k_uEC(k)) + "&searchenger=" + k_uEC(k_uOsr[ii]);
				}
			}
		}
	}
	function _do_count_page_visits() {
		sent_pc = true;
		var count = rC("count_page_visits");
		if (count == null || count.length <= 0) {
			count = 0;
		}
		count++;
		wC("count_page_visits", count, 1);
		if (is_average) {
			var target_target_id = rC("target_target_id");
			var target_admin_id = rC("target_admin_id");
			if (target_target_id != null && target_target_id.length > 0) {
				var Kimg = new Image();
				Kimg.onload = new function () {
					window.status = "saved track";
				};
				Kimg.src = xml_path + ado + "?account_id=" + kacct + "&client_id=" + client_id + "&opt=post&type=75&target_id=" + target_target_id + "&src_type=" + src_type + "&msg=" + count + "&.rnd=" + Math.random();
			}
			if (target_admin_id != null && target_admin_id.length > 0) {
				var img_admin = new Image();
				img_admin.onload = new function () {
					window.status = "saved track";
				};
				img_admin.src = xml_path + ado + "?account_id=" + kacct + "&client_id=" + client_id + "&opt=post&type=75&target_id=" + target_admin_id + "&src_type=" + src_type + "&msg=" + count + "&.rnd=" + Math.random();
			}
		} else {
			board_send_msg(0, 75, count);
		}
	}
	/*Get Msg*/
	function _getMsg() {
		dT(auto_get_msg);
		auto_get_msg = sT(__getMsg, get_msg_time_scape);
	}
	

	function operator_is_online(online_user_list, operator_id) {
		var j = 0;
		var count = online_user_list.length;
		while (j < count) {
			var tmp_sort = online_user_list[j];
			if (tmp_sort.member_id == operator_id) {
				return true;
			}
			j++;
		}
		return false;
	}
	function do_post_guestbook(str) {
		var message_img = new Image();
		message_img.onload = new function () {
					//nothing
		};
		message_img.src = xml_path + ado + "?account_id=" + kacct + "&type=9&client_id=" + client_id + "&target_id=" + get_operator_choice() + "&src_type=" + src_type + "&opt=post&msg=" + keC(str) + "&.rnd=" + Math.random();
		return true;
	}
	function get_operator_choice() {
		var is_online = false;
		var min_clients = 0;
		
		var j = 0;
		var count = all_user_list.length;
		if (count == 0) {
			wC("target_target_id", "", 0);
			wC("target_admin_id", "", 0);
		}
		var target_target_id = rC("target_target_id");
		var target_admin_id = rC("target_admin_id");
		if (target_target_id == null || target_target_id.length <= 0) {
			target_target_id = null;
		} else {
			is_online = operator_is_online(all_user_list, target_target_id);
			if (!is_online) {
				wC("target_target_id", "", 0);
				target_target_id = null;
			}
		}
		if (target_admin_id == null || target_admin_id.length <= 0) {
			target_admin_id = null;
		} else {
			if (!operator_is_online(all_user_list, target_admin_id)) {
				wC("target_admin_id", "", 0);
				target_admin_id = null;
			}
		}
		while (j < count) {
			var tmp_sort = all_user_list[j];
			if (tmp_sort.is_online()) {
				if (tmp_sort.is_admin()) {
					if (target_admin_id == null || target_admin_id.length <= 0) {
						target_admin_id = tmp_sort.member_id;
					}
				}
				if (!tmp_sort.is_admin()) {
					if (min_clients == 0) {
						min_clients = tmp_sort.clients_num;
					}
					if (tmp_sort.clients_num <= min_clients) {
						wC("target_target_id", tmp_sort.member_id);
						min_clients = tmp_sort.clients_num;
						min_clients_target_id = tmp_sort.member_id;
					}
				}
			}
			j++;
		}
		if (min_clients_target_id != null && min_clients_target_id > 0) {
			wC("target_target_id", min_clients_target_id);
		} else {
			min_clients_target_id = target_admin_id;
		}
		return min_clients_target_id;
	}
	function do_operator_choice(online_user_list, visiter, my_static) {
		var is_online = false;
		var min_clients = 0;
		var min_clients_target_id;
		var j = 0;
		var count = online_user_list.length;
		if (count == 0) {
			wC("target_target_id", "", 0);
			wC("target_admin_id", "", 0);
		}
		var target_target_id = rC("target_target_id");
		var target_admin_id = rC("target_admin_id");
		if (target_target_id == null || target_target_id.length <= 0) {
			target_target_id = null;
		} else {
			is_online = operator_is_online(online_user_list, target_target_id);
			if (!is_online) {
				wC("target_target_id", "", 0);
				target_target_id = null;
			}
		}
		if (target_admin_id == null || target_admin_id.length <= 0) {
			target_admin_id = null;
		} else {
			if (!operator_is_online(online_user_list, target_admin_id)) {
				wC("target_admin_id", "", 0);
				target_admin_id = null;
			}
		}
		while (j < count) {
			var tmp_sort = online_user_list[j];
			if (tmp_sort.is_online()) {
				if (tmp_sort.is_admin()) {
					if (target_admin_id == null || target_admin_id.length <= 0) {
						target_admin_id = tmp_sort.member_id;
						wC("target_admin_id", tmp_sort.member_id);
						img_admin = new Image();
						img_admin.src = xml_path + ado + "?ip_address=" + visiter_ip + "&max_visitor=" + max_visitor + "&account_id=" + kacct + "&client_id=" + client_id + "&visiter=" + visiter + "&opt=post&type=51&target_id=" + tmp_sort.member_id + "&src_type=" + src_type + "&referr=" + keC(this_referr) + "&msg=" + my_static + "&.rnd=" + Math.random() + "&vno=" + v_vno;
					}
				}
				if (!tmp_sort.is_admin()) {
							//if(!is_online){
					if (min_clients == 0) {
						min_clients = tmp_sort.clients_num;
					}
					if (tmp_sort.clients_num <= min_clients) {
						wC("target_target_id", tmp_sort.member_id);
						min_clients = tmp_sort.clients_num;
						min_clients_target_id = tmp_sort.member_id;
					}
							//}
				}
						//alert('is_online : '+is_online+' min_clients : '+min_clients+' min_clients_target_id : '+min_clients_target_id+' is_admin : '+tmp_sort.is_admin())
			}
			j++;
		}
				//alert("1 : "+min_clients_target_id);
		if (min_clients_target_id != null && min_clients_target_id > 0) {
					//alert("2 : "+min_clients_target_id);
			wC("target_target_id", min_clients_target_id);
			Kimg = new Image();
			Kimg.src = xml_path + ado + "?ip_address=" + visiter_ip + "&max_visitor=" + max_visitor + "&account_id=" + kacct + "&client_id=" + client_id + "&visiter=" + visiter + "&opt=post&type=51&target_id=" + min_clients_target_id + "&src_type=" + src_type + "&referr=" + keC(this_referr) + "&msg=" + my_static + "&.rnd=" + Math.random() + "&vno=" + v_vno;
		}
	}
	function _init() {
		_get_online_user();
	}
	
	function p_get_online_user() {
		my_static = rC("my_static_" + client_id);
		if (my_static == null || my_static.length <= 0) {
			my_static = 2;
		}

			//	var items = req.responseXML.getElementsByTagName("user");
		var str_user = "", tmpdata;
		var Kimg = new Array();
		if (all_user_list.length > 0) {
			var display_user_list = new Array();
			var hidden_user_list = new Array();
			var j = 0;
			var count = all_user_list.length;
			while (j < count) {
				var tmp_sort = all_user_list[j];
				if (tmp_sort.is_admin()) {
					admin_target_id = tmp_sort.member_id;
				}
				if (tmp_sort.is_online()) {
					display_user_list.push(all_user_list[j]);
				} else {
					hidden_user_list.push(all_user_list[j]);
				}
				j++;
			}
			if (is_average) {
				do_operator_choice(display_user_list, visiter, my_static);
			} //choice Operator.
		
			if (faq_count > 0) {
				if (bottype == 0) {
					if (is_ie7) {
						str_user += "<div id=\"div_flag_0\" style=\"line-height:14px;font-size:12px;color:#3333FF;cursor:pointer;overflow:hidden;width:95px;word-wrap:break-word;\" title=\"" + GLS(bot_name) + "\" onclick=\"javascript:do_resend_online_notice(0,'" + GLS(bot_name) + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=0&im_skin=" + skin_path + "','chat0'," + cpw + "," + cph + ",'no')\">&nbsp;<img id=\"img_flag_0\" src=\"" + xml_path + "/images/bot.gif\" vspace=\"1\" align=\"absmiddle\" />&nbsp;" + GLS(bot_name) + "</div>";
					} else {
						str_user += "<div id=\"div_flag_0\" class=\"KenFor_WangLingTong_PerService\" " + KenFor_WangLingTong_PerService_style + "><div class=\"KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnLine\"></div><div " + wanglingtong_list_style + " class=\"KenFor_WangLingTong_ServiceName\" title=\"" + GLS(bot_name) + "\" onclick=\"javascript:do_resend_online_notice(0,'" + GLS(bot_name) + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=0&im_skin=" + skin_path + "','chat0'," + cpw + "," + cph + ",'no')\">" + GLS(bot_name) + "</div></div>";
					}
				} else {
					if (display_user_list.length == 0) {
						if (is_ie7) {
							str_user += "<div id=\"div_flag_0\" style=\"line-height:14px;font-size:12px;color:#3333FF;cursor:pointer;overflow:hidden;width:95px;word-wrap:break-word;\" title=\"" + GLS(bot_name) + "\" onclick=\"javascript:do_resend_online_notice(0,'" + GLS(bot_name) + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=0&im_skin=" + skin_path + "','chat0'," + cpw + "," + cph + ",'no')\">&nbsp;<img id=\"img_flag_0\" src=\"" + xml_path + "/images/bot.gif\" vspace=\"1\" align=\"absmiddle\" />&nbsp;" + GLS(bot_name) + "</div>";
						} else {
							str_user += "<div id=\"div_flag_0\"  class=\"KenFor_WangLingTong_PerService\" " + KenFor_WangLingTong_PerService_style + "><div class=\"KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnLine\"></div><div " + wanglingtong_list_style + " class=\"KenFor_WangLingTong_ServiceName\" title=\"" + GLS(bot_name) + "\" onclick=\"javascript:do_resend_online_notice(0,'" + GLS(bot_name) + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=0&im_skin=" + skin_path + "','chat0'," + cpw + "," + cph + ",'no')\">" + GLS(bot_name) + "</div></div>";
						}
					}
				}
			}
			for (i = 0; i < display_user_list.length; i++) {
				tmpdata = display_user_list[i];
				online_user.push(tmpdata);
				var cookies_name = "sent_online_" + tmpdata.member_id;
				if (!is_average) {
			//				if(rC(cookies_name).length==0){
					wC(cookies_name, tmpdata.member_id, 0.5);
					Kimg[i] = new Image();
					Kimg[i].src = xml_path + ado + "?ip_address=" + visiter_ip + "&max_visitor=" + max_visitor + "&account_id=" + kacct + "&client_id=" + client_id + "&visiter=" + visiter + "&opt=post&type=51&target_id=" + tmpdata.member_id + "&src_type=" + src_type + "&referr=" + keC(this_referr) + "&msg=" + my_static + "&.rnd=" + Math.random() + "&vno=" + v_vno;
			//				}
				}
						//str_user+="<tr style="font-size: 12px;color: #000000;"><td style="line-height: 14px;font-size: 12px;color: #000000;" width="16" align="center"><img src=""+xml_path+"/images/"+im_face[tmpdata.status]+"" alt="" width="16" height="16" /></td><td style="line-height: 14px;font-size: 12px;color: #000000;" align="left"><a style="color:#3333FF;text-decoration: none;" title=""+GLS(im_status_tips[tmpdata.status])+"" href="javascript:void(0);" onclick="javascript:do_resend_online_notice("+tmpdata.member_id+",'"+tmpdata.net_name+"');cP('"+xml_path+"/index.jsp?ln="+target_ln+"&src_type=" + 2 +"&c="+account_id+"&client_id="+client_id+"&target_id="+tmpdata.member_id+"&im_skin="+skin_path+"','chat"+tmpdata.member_id+"',630,458,'no')">"+tmpdata.net_name+"</a></td></tr>";
				if (is_ie7) {
					str_user += "<div id=\"div_flag_" + tmpdata.member_id + "\" style=\"line-height:14px;font-size:12px;color:#3333FF;cursor:pointer;overflow:hidden;width:95px;word-wrap:break-word;\" title=\"" + GLS(im_status_tips[tmpdata.status]) + "\" onclick=\"javascript:do_resend_online_notice(" + tmpdata.member_id + ",'" + tmpdata.net_name + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + tmpdata.member_id + "&im_skin=" + skin_path + "','chat" + tmpdata.member_id + "'," + cpw + "," + cph + ",'no')\">&nbsp;<img id=\"img_flag_" + tmpdata.member_id + "\" src=\"" + xml_path + "/images/" + im_face[tmpdata.status] + "\" vspace=\"1\" align=\"absmiddle\" width=\"16\" height=\"16\" />&nbsp;" + tmpdata.net_name + "</div>";
				} else {
					if (tmpdata.status == 1) {
						str_user += "<div   class=\"KenFor_WangLingTong_PerService\" " + KenFor_WangLingTong_PerService_style + "><div id=\"div_status_" + tmpdata.member_id + "\" class=\"KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnLine\"></div><div id=\"div_flag_" + tmpdata.member_id + "\" " + wanglingtong_list_style + " class=\"KenFor_WangLingTong_ServiceName\" title=\"" + GLS(im_status_tips[tmpdata.status]) + "\" onclick=\"javascript:do_resend_online_notice(" + tmpdata.member_id + ",'" + tmpdata.net_name + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + tmpdata.member_id + "&im_skin=" + skin_path + "','chat" + tmpdata.member_id + "'," + cpw + "," + cph + ",'no')\">" + tmpdata.net_name + "</div></div>";
					} else {
						str_user += "<div   class=\"KenFor_WangLingTong_PerService\" " + KenFor_WangLingTong_PerService_style + "><div id=\"div_status_" + tmpdata.member_id + "\" class=\"KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnBusy\"></div><div id=\"div_flag_" + tmpdata.member_id + "\" " + wanglingtong_list_style + " class=\"KenFor_WangLingTong_ServiceName\" title=\"" + GLS(im_status_tips[tmpdata.status]) + "\" onclick=\"javascript:do_resend_online_notice(" + tmpdata.member_id + ",'" + tmpdata.net_name + "');cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + tmpdata.member_id + "&im_skin=" + skin_path + "','chat" + tmpdata.member_id + "'," + cpw + "," + cph + ",'no')\">" + tmpdata.net_name + "</div></div>";
					}
				}
			}
			for (i = 0; i < hidden_user_list.length; i++) {
				tmpdata = hidden_user_list[i];
				if (tmpdata.is_online()) {
					online_user.push(tmpdata);
					var cookies_name = "sent_online_" + tmpdata.member_id;
					if (!is_average) {
						wC(cookies_name, tmpdata.member_id, 0.5);
						Kimg[i] = new Image();
						Kimg[i].src = xml_path + ado + "?ip_address=" + visiter_ip + "&max_visitor=" + max_visitor + "&account_id=" + kacct + "&client_id=" + client_id + "&visiter=" + visiter + "&opt=post&type=51&target_id=" + tmpdata.member_id + "&src_type=" + src_type + "&referr=" + keC(this_referr) + "&msg=" + my_static + "&.rnd=" + Math.random() + "&vno=" + v_vno;
					}
				}
				if (is_ie7) {
					str_user += "<div id=\"div_flag_" + tmpdata.member_id + "\" style=\"line-height: 14px;font-size: 12px;color: #8F8F8F;cursor:pointer;overflow:hidden;width:95px;word-wrap:break-word;\" title=\"" + GLS(im_status_tips[tmpdata.status]) + "\" onclick=\"javascript:O_P_M_W(" + tmpdata.member_id + ")\">&nbsp;<img id=\"img_flag_" + tmpdata.member_id + "\" src=\"" + xml_path + "/images/status/offline_s.gif\" align=\"absmiddle\" width=\"16\" vspace=\"1\" height=\"16\" />&nbsp;" + tmpdata.net_name + "</div>";
				} else {
					str_user += "<div   class=\"KenFor_WangLingTong_PerService\" " + KenFor_WangLingTong_PerService_style + "><div id=\"div_status_" + tmpdata.member_id + "\" class=\"KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OffLine\"></div><div id=\"div_flag_" + tmpdata.member_id + "\"  class=\"KenFor_WangLingTong_ServiceName\" title=\"" + GLS(im_status_tips[tmpdata.status]) + "\" onclick=\"javascript:O_P_M_W(" + tmpdata.member_id + ")\">" + tmpdata.net_name + "</div></div>";
				}
			}
			if (!is_ie7) {
				str_user = "<div " + KenFor_WangLingTong_ListContent_style + " class=\"KenFor_WangLingTong_ListContent\" id=\"div_flag_list\">" + str_user + "</div>";
				
				str_user = "<div " + KenFor_WangLingTong_ListTitle_style + " class=\"KenFor_WangLingTong_ListTitle\">"+GLS(online_customer_title)+"</div>" + str_user;
				
			}
			if (show_search == 1 || end_date_flag == false) {
				if (is_ie7) {
					str_user += "<div id=\"div_flag_000\" style=\"line-height: 14px;font-size: 12px;color: #8F8F8F;cursor:pointer;overflow:hidden;width:95px;word-wrap:break-word;\">&nbsp;&nbsp;&nbsp;<a href=\"http://www.35so.cc\" target=\"_blank\" style=\"color:blue;text-decoration:none;\"><img id=\"img_flag_search\" border=\"0\" width=\"20\" height=\"20\" src=\"" + xml_path + "/images/35so.gif\" align=\"absmiddle\" width=\"20\" vspace=\"1\" height=\"20\"/>" + "<B>" + GLS(search_name) + "</B></a></div>";
				} else {
					str_user += "<div " + KenFor_WangLingTong_WebSite_style + " id=\"div_flag_000\" class=\"KenFor_WangLingTong_WebSite\"><span></span><a href=\"http://www.35so.cc\" target=\"_blank\">" + GLS(search_name) + "</a></div>";
				}
			}
		}
		
		var min_clients = 0;
		var j = 0;
		var asiPic="AsideOffline";
		var count = display_user_list.length;
		while (j < count) {
			has_online_operator = true;
			var tmp_sort = display_user_list[j];
			if (kDef_opt > 0 && kDef_opt == tmp_sort.member_id) {
				min_clients_target_id = kDef_opt;
				admin_target_id = kDef_opt;
				break;
			}
			if (min_clients == 0) {
				min_clients = tmp_sort.clients_num;
			}
			if (tmp_sort.clients_num <= min_clients) {
				min_clients = tmp_sort.clients_num;
				min_clients_target_id = tmp_sort.member_id;
			}
			j++;
		}
		if (im_style == 3) {
			var display_area = getObj("kim_area");
			var img_button = GLS(btn_3_off);
			var tmp_str = '';
			
			if(is_ie7&&(!is_phone)){
				tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\" alt=\"" + GLS(style_2_tips) + "\">" + img_button + "</a>";
				if (has_online_operator) {
					img_button = GLS(btn_3_on);
					tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\" alt=\"" + GLS(style_2_tips) + "\">" + img_button + "</a>";
				}
			}else{
				//fixed_three
				var img_button =  xml_path + "/images/Template_5_2_"+fixed_three+".png";
				if(newoffline_pic != null && newoffline_pic.length>0){
					img_button = "http://" + wlt_path + "/db_picture/" + newoffline_pic;
				}
				//新版样式
				tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\"><img src=\""  + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" width=\"" + button_width + "\" valign=\"absmiddle\" /></a>";
				if (has_online_operator) {
					img_button =  xml_path + "/images/Template_5_1_"+fixed_three+".png";
					if(newonline_pic != null && newonline_pic.length>0){
						img_button = "http://" + wlt_path + "/db_picture/" + newonline_pic;
					}
					tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\"><img src=\""  + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" width=\"" + button_width + "\" valign=\"absmiddle\" /></a>";
				}
				//若为手机版
				if(is_phone){
					if(admin_target_id==undefined){
						admin_target_id=0;
					}
					var url = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\" style=\"display: block; height: inherit; width: inherit;\"></a>";
					if (has_online_operator) {
						asiPic="Aside";
						url = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\" style=\"display: block; height: inherit; width: inherit;\"></a>";
					}
					tmp_str = "<aside id=\"KenFor_WangLingTong_Fixed\" style=\"background: url("+xml_path+"/images/"+asiPic+".png); background-size: 54px; height: 54px; position: fixed; left: 100%; margin: 0 0 0 -64px; top: 70%; width: 54px; z-index: 1000;\">"+url+"</aside>"
					//手机版在head添加<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />
					//document.getElementsByTagName("head")[0].innerHTML=document.getElementsByTagName("head")[0].innerHTML+"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />";
				}
			}
			tmp_str += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + xml_path + "/css/KenFor_WangLingTong.css\" />";
			display_area.innerHTML = tmp_str;
			if(is_phone){
				WangLingTong_DragMove();
			}
		} else {
			//设置旧模板浮动图片样式(mobile和pc)
			if (im_style == 2) {
				var display_area = getObj("kim_area");
				var tmp_str = '';
				if(is_phone){
					if(admin_target_id==undefined){
						admin_target_id=0;
					}
					var url = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\" style=\"display: block; height: inherit; width: inherit;\"></a>";
					if (has_online_operator) {
						asiPic="Aside";
						url = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\" style=\"display: block; height: inherit; width: inherit;\"></a>";
					}
					tmp_str = "<aside id=\"KenFor_WangLingTong_Fixed\" style=\"background: url("+xml_path+"/images/"+asiPic+".png); background-size: 54px; height: 54px; position: fixed; left: 100%; margin: 0 0 0 -64px; top: 70%; width: 54px; z-index: 1000;\">"+url+"</aside>"
					//手机版在head添加<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />
					document.getElementsByTagName("head")[0].innerHTML=document.getElementsByTagName("head")[0].innerHTML+"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />";
					tmp_str += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + xml_path + "/css/KenFor_WangLingTong.css\" />";
					display_area.innerHTML = tmp_str;
					WangLingTong_DragMove();
				}else{
					var img_button = "http://" + wlt_path + "/db_picture/" + offline_pic;
					var tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\"><img src=\"" + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" valign=\"absmiddle\" border=\"0\"/></a>";
					if (has_online_operator) {
						img_button = "http://" + wlt_path + "/db_picture/" + online_pic;
						tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\"><img src=\"" + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" valign=\"absmiddle\" border=\"0\"/></a>";
					}
					_floters_it_2(tmp_str);
				}
			} else {
				if (im_style == 1 || im_style == 5) {
					var display_area = getObj("kim_area");
					var tmp_str = '';
					if(is_phone){
						if(admin_target_id==undefined){
							admin_target_id=0;
						}
						var url = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\" style=\"display: block; height: inherit; width: inherit;\"></a>";
						if (has_online_operator) {
							asiPic="Aside";
							url = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\" style=\"display: block; height: inherit; width: inherit;\"></a>";
						}
						tmp_str = "<aside id=\"KenFor_WangLingTong_Fixed\" style=\"background: url("+xml_path+"/images/"+asiPic+".png); background-size: 54px; height: 54px; position: fixed; left: 100%; margin: 0 0 0 -64px; top: 70%; width: 54px; z-index: 1000;\">"+url+"</aside>"
						//手机版在head添加<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />
						document.getElementsByTagName("head")[0].innerHTML=document.getElementsByTagName("head")[0].innerHTML+"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />";
						tmp_str += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + xml_path + "/css/KenFor_WangLingTong.css\" />";
						display_area.innerHTML = tmp_str;
						WangLingTong_DragMove();
					}else{
						if (str_user != "") {
								_floters_it(str_user);
						}
					}
				} else {
					var display_area = getObj("kim_area");
					var tmp_str = '';
					if(is_phone){
						if(admin_target_id==undefined){
							admin_target_id=0;
						}
						var url = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\" style=\"display: block; height: inherit; width: inherit;\"></a>";
						if (has_online_operator) {
							asiPic="Aside";
							url = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\" style=\"display: block; height: inherit; width: inherit;\"></a>";
						}
						tmp_str = "<aside id=\"KenFor_WangLingTong_Fixed\" style=\"background: url("+xml_path+"/images/"+asiPic+".png); background-size: 54px; height: 54px; position: fixed; left: 100%; margin: 0 0 0 -64px; top: 70%; width: 54px; z-index: 1000;\">"+url+"</aside>"
						//手机版在head添加<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />
						document.getElementsByTagName("head")[0].innerHTML=document.getElementsByTagName("head")[0].innerHTML+"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1 user-scalable=no\" />";
						tmp_str += "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + xml_path + "/css/KenFor_WangLingTong.css\" />";
						display_area.innerHTML = tmp_str;
						WangLingTong_DragMove();
					}else{
						var img_button = "/images/lm" + interface_lan + ".gif";
						var button_width = 77;
						if (interface_lan == 2) {
							button_width = 110;
						}
						var display_area = getObj("kim_area");
						var tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:O_P_M_W(" + admin_target_id + ")\"><img src=\"" + xml_path + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" width=\"" + button_width + "\" valign=\"absmiddle\" height=\"19\" border=\"0\"/></a>";
						if (has_online_operator) {
							img_button = "/images/ch" + interface_lan + ".gif";
							tmp_str = "<a href=\"javascript:void(0)\" onclick=\"javascript:cP('" + xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path + "','chat" + min_clients_target_id + "'," + cpw + "," + cph + ",'no')\"><img src=\"" + xml_path + img_button + "\" alt=\"" + GLS(style_2_tips) + "\" width=\"" + button_width + "\" valign=\"absmiddle\" height=\"19\" border=\"0\"/></a>";
						}
						display_area.innerHTML = tmp_str;
					}
				}
			}
		}
		status = true;
		is_loading = false;
		if (!sent_pc) {
			_do_count_page_visits();
		}
		if (autopop) {
			autopop_timmer = sT(kim_pop, 1000);
		}
		(new Image()).src = xml_path + "/sm_new_entry.jsp?account_id=" + kacct;
				
				//linbaoji 0701  加入自动更新客服状态
		sT(updateKimUser, 60000);
	}
	try {
		var load_default = kDoc.body.onload;
		var flagLoad = flagLoad ? true : false;
		var new_onload = function () {
			try {
				if (load_default != null && typeof (load_default) == "function") {
					if (flagLoad) {
						return;
					} else {
						flagLoad = true;
					}
					load_default();
				}
				new_init();
			}
			catch (e) {
				window.stauts = e.message;
				new_init();
			}
			finally {
				flagLoad = true;
			}
		};
		new_onload();
	}
	catch (e) {
		new_init();
		window.stauts = e.message;
	}
	if (_ur.indexOf("show.roogoo.com") > 0) {
		_ur = unescape(_ur);
	}
	var i = 0, h, k;
	if ((i = _ur.indexOf("://")) < 0) {
		return "";
	}
}
//悬浮框初始化----core end
//关闭旧版侧边栏
function kim_close_f(name) {
	/*	if(getObj('table_content').style.display == 'none'){
				getObj('area_close').alt=GLS(message_window_close);
				getObj('table_content').style.display = 'block';
			}else{
				getObj('area_close').alt=GLS(message_window_open);
				getObj('table_content').style.display = 'none';
			}*/
	dT(floters_notice_time);
	dT(online_user_timer);
	dT(keep_online);
	dT(auto_get_msg);
	dT(floters_time);
	getObj(name).style.display = "none";
}

function kim_notice_play() {
	scrollTop = kDoc.body.scrollTop;
	scrollLeft = kDoc.body.scrollLeft;
	if (kDoc.body.scrollTop == 0 && kDoc.documentElement.scrollTop >= 0) {
		scrollTop = kDoc.documentElement.scrollTop;
	}
	if (kDoc.body.scrollLeft == 0 && kDoc.documentElement.scrollLeft >= 0) {
		scrollLeft = kDoc.documentElement.scrollLeft;
	}
	for (var i = 0; i < kim_notice_collection.length; i++) {
		var followObj = kim_notice_collection[i].object;
		var followObj_x = (typeof (kim_notice_collection[i].x) == "string" ? eval(kim_notice_collection[i].x) : kim_notice_collection[i].x);
		var followObj_y = (typeof (kim_notice_collection[i].y) == "string" ? eval(kim_notice_collection[i].y) : kim_notice_collection[i].y);
		if (followObj.offsetLeft != (scrollLeft + followObj_x)) {
			var dx = (scrollLeft + followObj_x - followObj.offsetLeft) * 0.5;
			dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
			tmp = followObj.style.left;
			tmp = tmp.substr(0, tmp.length - 2);
			if (eval(tmp) > 0) {
				followObj.style.left = followObj.offsetLeft + dx;
			}
		}
		if (followObj.offsetTop != (scrollTop + followObj_y)) {
			var dy = (scrollTop + followObj_y - followObj.offsetTop) * 0.5;
			dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
			tmp = followObj.style.top;
			tmp = tmp.substr(0, tmp.length - 2);
			if (eval(tmp) > 0) {
				followObj.style.top = followObj.offsetTop + dy + "px";
			} else {
				if (eval(tmp) < 0) {
					followObj.style.top = "0px";
				}
			}
		}
		return;
		followObj.style.display = "";
	}
	if (is_show) {
		if (getObj("kim_msgN_floaters") != null) {
			var inner = getObj("kim_msgN_floaters").innerText == null ? getObj("kim_msgN_floaters").innerHtml : getObj("kim_msgN_floaters").innerText;
			if (inner == null || inner.length <= 0) {
				if (getObj("kim_msgN_floaters").style.display != "none") {
					getObj("kim_msgN_floaters").innerHTML = notice_my_content;
				}
			}
		} else {
			var kim_msgN_floaters = new kim_notice_floaters();
			kim_msgN_floaters.addItem("kim_msgN_floaters", 350, "200", notice_my_content);
			skim_msgN_floaters.kim_notice_play();
		}
	}
}
var floters_notice_time;
var notice_my_content;
//在客户端在线并执行弹出框提示时调用此方法--------begin
function kim_notice_floaters() {
	this.items = [];
	//不在第一次加截中调用 ，（没看过有调用）
	this.addItem = function (id, x, y, content) {
	
		notice_my_content = content;
		
		var div_obj = getObj("float_notice_win");
		if (div_obj == null) {
			div_obj = makeObj("div");
			div_obj.id = "float_notice_win";
		}
		div_obj.innerHTML = "<DIV id=" + id + " style=\"Z-INDEX: 8889; POSITION: fixed;  width:80px; height:60px;left:" + (typeof (x) == "string" ? eval(x) : x) + "px" + ";top:" + (typeof (y) == "string" ? eval(y) : y) + "px" + "\">" + content + "</DIV>";
		kDoc.body.appendChild(div_obj);
		var newItem = {};
		newItem.object = getObj(id);
		newItem.x = x;
		newItem.y = y;
		this.items[this.items.length] = newItem;
	};
	this.kim_notice_play = function () {
		kim_notice_collection = this.items;
		dT(floters_notice_time);
		floters_notice_time = sT("kim_notice_play()", 100);
	};
}
//在客户端在线并执行弹出框提示时调用此方法--------end

//客户端发信息给web端时弹出框
function s_c_m_b(_msg, chat_target_id) {
	is_show = true;
	dT(auto_get_msg);
	if (is_ie7) {
		_msgs = "<div id=\"wlt_eMeng\" style=\"margin: auto; width: 300px;POSITION: absolute;Z-INDEX:99999;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"color: #000; font: 12px Verdana, Arial, Helvetica, sans-serif;\"><tr><td ondblclick=\"void(0);\" onmouseover=\"over=true;\" onmouseout=\"over=false;\" width=\"120\" style=\"" + (im_style == 5 ? "" : "cursor:move;") + "background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_01.gif\" alt=\"\" id=\"1\" width=\"120\" height=\"33\" /></td><td align=\"right\" valign=\"top\" style=\"background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><a href=\"javascript:closeDivDelete(" + chat_target_id + ");\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/close_r.gif\" alt=\"" + GLS(message_window_close) + "\" width=\"18\" height=\"12\" border=\"0\" /></a></td><td width=\"15\" style=\"background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_02.gif\" alt=\"\" width=\"15\" height=\"33\" /></td></tr></table><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"4\" style=\"border-bottom:#65578C 1px solid; border-left:#65578C 1px solid; border-right:#65578C 1px solid; background:#F5F7FE;\" style=\"color: #000; font: 12px Verdana, Arial, Helvetica, sans-serif;\"><tr><td style=\"border:#B4B9C9 1px solid; background:#fff; padding:10px 0px 0px 0px;\"><table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr><td width=\"60\" valign=\"top\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/inco_01.gif\" alt=\"\" width=\"60\" height=\"60\" /></td><td valign=\"top\"><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\" cols=\"2\"><tr align=\"right\"><td height=\"35\" align=\"left\" class=\"text\"><span style=\"color:#65578C; font-weight:bold;font: 12px Verdana, Arial, Helvetica, sans-serif;\">" + _msg + "</span></td></tr></table></td></tr></table></td></tr></table></div>";
	} else {
		_msgs = "<div id=\"KenFor_PopUpFrame\"><div class=\"KenFor_PopUpFrame_Body\"><img alt=\"#\" src=\""+xml_path+"/images/PopUpFrame.png\" /><div class=\"Div_PopUpFrame_Content\"><div>" + _msg + "</div></div></div></div>";
	}
	var kim_msgN_floaters = new kim_notice_floaters();
	kim_msgN_floaters.addItem("kim_msgN_floaters", 350, "200", _msgs);
	kim_msgN_floaters.kim_notice_play();
}

//客户端在线时web访问则弹出是否对话的弹出框
function s_n_m_b(_msg) {
//linbaoji_
	is_show = true;
	dT(auto_get_msg);
	_msgs = _msg.split("|");//msg|target_id|net_name|dep  
	if (is_ie7) {
		tmp_msgs = "<div id=\"wlt_eMeng\" style=\"margin: auto; width: 350px;POSITION: absolute;Z-INDEX:99999;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"color: #000; font: 12px Verdana, Arial, Helvetica, sans-serif;\"><tr><td ondblclick=\"void(0);\" onmouseover=\"over=true;\" onmouseout=\"over=false;\" width=\"120\" style=\"" + (im_style == 5 ? "" : "cursor:move;") + ";background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_01.gif\" alt=\"\" id=\"1\" width=\"120\" height=\"33\" /></td><td align=\"right\" valign=\"top\" style=\"background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><a href=\"javascript:closeDiv();\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/close_r.gif\" alt=\"" + GLS(message_window_close) + "\" width=\"18\" height=\"12\" border=\"0\" /></a></td><td width=\"15\" style=\"background: #fff url(" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_Bg.gif) repeat-x left top;\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/leaveWordTitle_02.gif\" alt=\"\" width=\"15\" height=\"33\" /></td></tr></table><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"4\" style=\"border-bottom:#65578C 1px solid; border-left:#65578C 1px solid; border-right:#65578C 1px solid; background:#F5F7FE;\" style=\"color: #000; font: 12px Verdana, Arial, Helvetica, sans-serif;\"><tr><td style=\"border:#B4B9C9 1px solid; background:#fff; padding:10px 0px 0px 0px;\"><table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\"><tr><td width=\"60\" valign=\"top\"><img src=\"" + xml_path + "/skins/" + skin_path + "/images/inco_01.gif\" alt=\"\" width=\"60\" height=\"60\" /></td><td valign=\"top\"><table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"3\" cellspacing=\"0\" cols=\"2\"><tr align=\"right\"><td height=\"35\" align=\"left\" class=\"text\"><span style=\"color:#65578C; font-weight:bold;font: 12px Verdana, Arial, Helvetica, sans-serif;\">" + _msgs[0] + "</span><p style=\"color:#65578C; font-weight:bold;font: 12px Verdana, Arial, Helvetica, sans-serif;\">" + GLS(msg_notice_3) + "</p></td></tr><tr align=\"right\"><td align=\"right\" height=\"35\"><img border=\"0\" width=\"63\" style=\"cursor:pointer;\" onclick=\"javascript:do_chat_reply(" + _msgs[1] + ",true,'" + _msgs[2] + "','" + _msgs[3] + "','" + _msgs[0] + "');closeDiv();\" height=\"23\" src=\"" + xml_path + "/skins/" + skin_path + "/images/" + message_window_img[target_ln][0] + "\"/>&nbsp;&nbsp;<img border=\"0\" width=\"63\" style=\"cursor:pointer;\" onclick=\"javascript:do_chat_reply(" + _msgs[1] + ",false,'" + _msgs[2] + "','" + _msgs[3] + "','" + _msgs[0] + "');closeDivDelete(" + _msgs[1] + ");\" height=\"23\" src=\"" + xml_path + "/skins/" + skin_path + "/images/" + message_window_img[target_ln][2] + "\"/></td></tr></table></td></tr></table></td></tr></table></div>";
	} else {
		tmp_msgs = "<div id=\"KenFor_PopUpFrame\"><div class=\"KenFor_PopUpFrame_Body\"><img alt=\"#\" src=\""+xml_path+"/images/PopUpFrame.png\" /><div class=\"Div_PopUpFrame_Content\"><div>"+GLS(welcome_title_p1)+"<br>"+GLS(welcome_title_p2)+"</div></div><div class=\"Div_PopUpFrame_ButtonGroup\"><div class=\"Div_PopUpFrame_Ignore\" onclick=\"javascript:do_chat_reply(" + _msgs[1] + ",false,'" + _msgs[2] + "','" + _msgs[3] + "','" + _msgs[0] + "');closeDivDelete(" + _msgs[1] + ");\">"+GLS(agree_no)+"</div><div class=\"Div_PopUpFrame_Accept\" onclick=\"javascript:do_chat_reply(" + _msgs[1] + ",true,'" + _msgs[2] + "','" + _msgs[3] + "','" + _msgs[0] + "');closeDiv();\">"+GLS(agree_yes)+"</div></div></div></div>";
	}
	var kim_reqN_floaters = new kim_notice_floaters();
	kim_reqN_floaters.addItem("kim_msgN_floaters", 300, "200", tmp_msgs);
	kim_reqN_floaters.kim_notice_play();
}


//流量分析
//-- Auto/Organic Sources and Keywords
var k_uOsr = new Array();
var k_uOkw = new Array();
k_uOsr[0] = "google"; k_uOkw[0] = "q";
k_uOsr[1] = "yahoo";  k_uOkw[1] = "p";
k_uOsr[2] = "msn";    k_uOkw[2] = "q";
k_uOsr[3] = "aol";    k_uOkw[3] = "query";
k_uOsr[4] = "aol";    k_uOkw[4] = "encquery";
k_uOsr[5] = "lycos";  k_uOkw[5] = "query";
k_uOsr[6] = "ask";    k_uOkw[6] = "q";
k_uOsr[7] = "altavista";  k_uOkw[7] = "q";
k_uOsr[8] = "sogou";   k_uOkw[8] = "query";
k_uOsr[9] = "netscape";  k_uOkw[9] = "s";
k_uOsr[10] = "cnn";    k_uOkw[10] = "query";
k_uOsr[11] = "looksmart"; k_uOkw[11] = "qt";
k_uOsr[12] = "about";  k_uOkw[12] = "terms";
k_uOsr[13] = "mamma";  k_uOkw[13] = "query";
k_uOsr[14] = "alltheweb"; k_uOkw[14] = "q";
k_uOsr[15] = "gigablast"; k_uOkw[15] = "q";
k_uOsr[16] = "voila";   k_uOkw[16] = "kw";
k_uOsr[17] = "virgilio";  k_uOkw[17] = "qs";
k_uOsr[18] = "live";    k_uOkw[18] = "q";
k_uOsr[19] = "baidu";   k_uOkw[19] = "wd";
k_uOsr[20] = "alice";   k_uOkw[20] = "qs";
k_uOsr[21] = "3721";    k_uOkw[21] = "p";
k_uOsr[22] = "iask";    k_uOkw[22] = "k";
k_uOsr[23] = "163";     k_uOkw[23] = "q";
k_uOsr[24] = "soso";    k_uOkw[24] = "w";
k_uOsr[25] = "search";  k_uOkw[25] = "q";
k_uOsr[26] = "baidu";   k_uOkw[26] = "word";
k_uOsr[27] = "roogoo";  k_uOkw[27] = "q";
k_uOsr[28] = "bing";    k_uOkw[28] = "q";
k_uOsr[29] = "youdao";  k_uOkw[29] = "q";
k_uOsr[30] = "35so";    k_uOkw[30] = "queryString";
k_uOsr[31] = "youdao";  k_uOkw[31] = "lq";
k_uOsr[32] = "jike";    k_uOkw[32] = "q";
k_uOsr[33] = "360";     k_uOkw[33] = "q";
k_uOsr[34] = "haosou";  k_uOkw[34] = "q";
k_uOsr[35] = "yisou";   k_uOkw[35] = "q";
k_uOsr[36] = "ask";     k_uOkw[36] = "q";
k_uOsr[37] = "uc";      k_uOkw[37] = "keyword";
k_uOsr[38] = "sogou";   k_uOkw[38] = "keyword";
k_uOsr[39] = "jwss";    k_uOkw[39] = "q";		
k_uOsr[40] = "hotbot";  k_uOkw[40] = "q";
k_uOsr[41] = "fresheye"; k_uOkw[41] = "kw";
k_uOsr[42] = "bing";    k_uOkw[42] = "q";
k_uOsr[43] = "ceek";    k_uOkw[43] = "q";
k_uOsr[44] = "yandex";  k_uOkw[44] = "text";
k_uOsr[45] = "dogpile"; k_uOkw[45] = "q";
k_uOsr[46] = "anzwers"; k_uOkw[46] = "q";
k_uOsr[47] = "accoona"; k_uOkw[47] = "s";
k_uOsr[48] = "webalta"; k_uOkw[48] = "q";
k_uOsr[49] = "yippy";   k_uOkw[49] = "query";
var k_uOno = new Array();
var k_uRno = new Array();
function k_uEC(s) {
	var n = "";
	if (!s || s == "") {
		return "";
	}
	for (var i = 0; i < s.length; i++) {
		if (s.charAt(i) == " ") {
			n += "+";
		} else {
			n += s.charAt(i);
		}
	}
	return n;
}


//
function __play() {
	for (var i = 0; i < __collection.length; i++) {
		var followObj = __collection[i].object;
		var followObj_x = (typeof (__collection[i].x) == "string" ? eval(__collection[i].x) : __collection[i].x);
		var followObj_y = (typeof (__collection[i].y) == "string" ? eval(__collection[i].y) : __collection[i].y);
		if (followObj.offsetLeft != (scrollLeft + followObj_x)) {
			var dx = (scrollLeft + followObj_x - followObj.offsetLeft) * __delta;
			dx = (dx > 0 ? 1 : -1) * Math.ceil(Math.abs(dx));
			tmp = followObj.style.left;
			tmp = tmp.substr(0, tmp.length - 2);
			if (eval(tmp) > 0) {
				followObj.style.left = followObj.offsetLeft + dx + "px";
			}
		}
		if (followObj.offsetTop != (scrollTop + followObj_y)) {
			var dy = (scrollTop + followObj_y - followObj.offsetTop) * __delta;
			dy = (dy > 0 ? 1 : -1) * Math.ceil(Math.abs(dy));
			tmp = followObj.style.top;
			tmp = tmp.substr(0, tmp.length - 2);
			if (eval(tmp) > 0 && followObj.offsetTop + dy < kDoc.documentElement.scrollHeight - followObj.offsetHeight - 50) {
				followObj.style.top = followObj.offsetTop + dy + "px";
			} else {
				if (eval(tmp) < 0) {
					followObj.style.top = "0px";
				}
			}
		}
		followObj.style.display = "";
	}
	if (getObj("float_win") != null) {
		if (im_style == 1 || im_style == 5) {
			if (getObj("__floaters") != null) {
				if (getObj("__floaters").innerText == "") {
					if (false && getObj("__floaters").style.display != "none") {
						getObj("__floaters").innerHTML = my_content;
					}
				}
			} else {
				var the__floaters = new __floaters();
				the__floaters.addItem("__floaters", offsetW, "offsetH", my_content);
				the__floaters.__play();
			}
		} else {
			if (im_style == 2) {
				if (getObj("__floaters_a") != null) {
					if (getObj("__floaters_a").innerHTML.indexOf("Yahoo!") > -1) {
						if (getObj("__floaters_a").style.display != "none") {
							getObj("__floaters_a").innerHTML = my_content;
						}
					}
				} else {
					var the__floaters = new __floaters();
					the__floaters.addItem("__floaters_a", offsetW, "offsetH", my_content);
					the__floaters.__play();
				}
			}
		}
	}
}
var is_auto_pop = false;
function kim_pop() {
	waitting = waitting - 1000;
	if (waitting <= 0) {
		dT(autopop_timmer);
		if (!has_refuse && online_user.length > 0) {
			is_auto_pop = true;
			showDetail(2, min_clients_target_id);
		}
	}
// document.title=waitting +" : " + has_refuse ;
}
function do_resend_online_notice(id, name) {
	wC("chat_target", id, 1);
	wC("chat_netname", name, 1);
	var cookies_name = "sent_online_" + id;
	wC(cookies_name, id, 1);
	Kimg = new Image();
	Kimg.src = xml_path + ado + "?ip_address=" + visiter_ip + "&auto_send=1&max_visitor=" + max_visitor + "&auto_send=1&account_id=" + kacct + "&client_id=" + client_id + "&visiter=" + visiter + "&opt=post&type=51&target_id=" + id + "&src_type=" + src_type + "&referr=" + keC(this_referr) + "&msg=" + my_static + "&.rnd=" + Math.random() + "&vno=" + v_vno;
}
function do_get_target_id(display_user_list) {
//				alert(display_user_list);
}
function null_fun() {
	return;
}
function keep_online() {
	var tmp = "";
	if (online_user != null && online_user.length > 0) {
		Kimg = new Image();
		for (i = 0; i < online_user.length; i++) {
			tmp += online_user[i].member_id + ",";
		}
		if (tmp.indexOf(",") > 0) {
			tmp = tmp.substring(0, tmp.length - 1);
		}
		Kimg.src = xml_path + ado + "?account_id=" + kacct + "&client_id=" + client_id + "&src_type=" + src_type + "&opt=post&type=6&target_id=" + tmp + "&.rnd=" + Math.random(); //keep online
	}
}
keep_online = sT(keep_online, 20000);
function do_chat_reply(target_id, is_allow, net_name, dep, req_msg) {
	dT(auto_get_msg);
	auto_get_msg = sT(__getMsg, get_msg_time_scape);
	if (is_allow) {
		wC("my_static_" + client_id, 1, 3);
		wC("chat_target", target_id, 1);
		wC("chat_netname", net_name, 3);
		board_send_msg(target_id, 56, net_name + "," + target_id);
		do_resend_online_notice(target_id, net_name);
		cP(xml_path + "/" + tagPage + "?ln=" + target_ln + "&client_id=" + client_id + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&target_id=" + target_id + "&im_skin=" + skin_path, "chat" + target_id, cpw, cph, "no");
	} else {
		wC("my_static_" + client_id, 0, 3);
		if (!is_auto_pop) {
			board_send_msg(target_id, 55, net_name + "," + target_id);
		}
	}
}
function board_send_msg(target_id, type, msg) {
	if (online_user != null && online_user.length > 0) {
		Kimg = new Array();
		for (i = 0; i < online_user.length; i++) {
			Kimg[i] = new Image();
			var tmp = online_user[i];
			Kimg[i].src = xml_path + ado + "?account_id=" + kacct + "&client_id=" + client_id + "&src_type=" + src_type + "&opt=post&target_id=" + tmp.member_id + "&type=" + type + "&msg=" + keC(msg) + "&.rnd=" + Math.random();//广播聊天
		}
	}
}
var is_need_sent_end_chat = 0;
function return_window_is_open() {
	if (win_open == null) {
		return false;
	}
	if (win_open.closed) {
		if (is_need_sent_end_chat <= 0) {
			Kimg = new Image();
			is_need_sent_end_chat = 1;
		}
		return false;
	} else {
		return true;
	}
}
var hD = "0123456789ABCDEF";
function d2h(d) {
	var aa = d;
	var h = hD.substr(d & 15, 1);
	while (d > 15) {
		d >>= 4;
		h = hD.substr(d & 15, 1) + h;
	}
	if (h == "0") {
		h = "000000";
	} else {
		if (aa < 16) {
			h = "0" + h;
		}
		len = 6 - h.length;
		for (i = 1; i <= len; i++) {
			if (aa > 65280 || aa < 255) {
				h += "0";
			} else {
				h = "0" + h;
			}
		}
	}
	h = h.substring(4, 6) + h.substring(2, 4) + h.substring(0, 2);
	return h;
}
function h2d(h) {
	h = h.substring(4, 6) + h.substring(2, 4) + h.substring(0, 2);
	return parseInt(h, 16);
}
function trans_ubb_html(str) {
	regexp = /\[em(.*?)\]/ig;
	str = str.replace(regexp, "<img src='" + xml_path + "/editorimages/smileys/$1.gif' border='0' ubbname='$1'>");
	str = str.replace(/\n/g, "<br/>");
	return str;
}
function _dochkdate(date) {
		currdate = new Date();
		userdate = new Date(date);
		currdate.setDate(currdate.getDate() - 1);
		var result = true;
		if (currdate <= userdate) {
			result = true;
		} else {
			result = false;
		}
		return result;
	}
function fnErrorTrap(sMsg, sUrl, sLine) {
	if (!_dochkdate(end_date) && end_date != undefined) {
		return true;
	}
	var err_msg = "An error was thrown and caught.<br/>";
	err_msg += "Account: " + kacct + "<br/>";
	err_msg += "Error: " + sMsg + "<br/>";
	err_msg += "Line: " + sLine + "<br/>";
	err_msg += "URL: " + sUrl + "<br/>";
	err_msg += "Browser: " + getBrowser() + "<br/>";
	err_msg += "System: " + getOS();
	Kimg = new Image();
	Kimg.src = xml_path + "/errorAction.do?error=" + keC(err_msg);
	return true;
}

//检查客服用户的在线状态
function updateKimUser(userList) {
	var updateKimUser_url = xml_path+"/kimUserStatu.jsp?account_id=" + c_accountId;
	var script = document.createElement("script"), s = document.getElementsByTagName("script")[0];
	script.onreadystatechange = script.onload = function () {
		if (!script.readyState || /loaded|complete/i.test(script.readyState)) {
			script.onreadystatechange = script.onload = null;
			script.parentNode.removeChild(script);
		}
	};
	script.type = "text/javascript";
	s.parentNode.insertBefore(script, s);
	script.src = updateKimUser_url;
}	
//检查客服用户的运行状态 返回回调
function updateKimUserCallBack(userList) {
	for (var i = 0; i < userList.length; i++) {
		var tmpUser = userList[i];
		if (tmpUser) {
			var charDiv = getObj("div_flag_" + tmpUser.member_id);
			var statusDiv;
			var temp_list = "";
			if (charDiv) {
				if (tmpUser.status == 1 || tmpUser.status == 3 || tmpUser.status == 4) {
					charDiv.title = GLS(im_status_tips[tmpUser.status]);
					charDiv.onclick = (function (user) {
						return function () {
							do_resend_online_notice(user.member_id, user.net_name);
							cP(xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + user.member_id + "&im_skin=" + skin_path, "chat" + user.member_id, cpw, cph, "no");
						};
					})(tmpUser);//要求闭包
					if (is_ie7) {
						charDiv.style.color = "#3333FF";
						var imgChar = getObj("img_flag_" + tmpUser.member_id);
						imgChar.src = xml_path + "/images/" + im_face[tmpUser.status];
					} else {
						statusDiv = getObj("div_status_" + tmpUser.member_id);
						if (tmpUser.status == 1) {
							statusDiv.setAttribute("class", "KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnLine");
						} else {
							statusDiv.setAttribute("class", "KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OnBusy");
						}
					}
				} else {
					charDiv.title = GLS(im_status_tips[tmpUser.status]);
					charDiv.onclick = (function (user) {
						return function () {
							O_P_M_W(user.member_id);
						};
					})(tmpUser);//要求闭包
					if (is_ie7) {
						charDiv.style.color = "#8F8F8F";
						var imgChar = getObj("img_flag_" + tmpUser.member_id);
						imgChar.src = xml_path + "/images/status/offline_s.gif";
					} else {
						statusDiv = getObj("div_status_" + tmpUser.member_id);
						statusDiv.setAttribute("class", "KenFor_WangLingTong_ServiceFlag KenFor_WangLingTong_OffLine");
					}
					temp_list += charDiv;
				}
			}
					//alert(temp_list.toString() );
		}
	}
}
//离线留言提交数据方法-----begin
function element_Form_obj(form) {
		var args = "";
		for (i = 0; i < form.length; i++) {
			this_value = "";
			if (form[i].type != "submit" && form[i].type != "reset" && form[i].type != "button" && form[i].type != "image") {
				if (form[i].type == "radio") {
					if (form[i].checked == true) {
						this_value = form[i].value;
						args += GLS(msg_box_sex) + ":" + this_value + "\n";
					}
				} else {
					this_value = form[i].value;
					args += form[i].title + ":" + this_value + "\n";
				}
			}
		}
		args = args.substring(0, args.length - 1);
		return args;
	}
function DI_Dialog(win, form, target_id) {
		args = element_Form_obj(form);
		var message_img = new Image();
		message_img.onload = new function () {
			if (is_ie7) {
				win.alert(GLS(meg_box_sent_success));
				win.close();
			}
		};
		message_img.src = xml_path + ado + "?account_id=" + kacct + "&type=9&client_id=" + client_id + "&target_id=" + target_id + "&src_type=" + src_type + "&opt=post&msg=" + keC(args) + "&.rnd=" + Math.random();
	}
//离线留言提交数据方法------end

function DI_Dialog_new(win,form,target_id){
	args = element_Form_obj(form);
	var message_img = new Image();
	message_img.src=xml_path+ado+'?account_id='+kacct+'&type=9&client_id='+client_id+'&target_id='+target_id+'&src_type='+src_type

+'&opt=post&msg='+keC(args)+'&.rnd='+Math.random();
}

		//保存用户习惯----begin
function _do_save_client() {
	var Cimg = new Image();
	Cimg.onload = new function () {
		window.status = "saved client";
	};
	Cimg.src = xml_path + "/saveClientAction.do?client_id=" + client_id + "&.rnd=" + Math.random();
}
//保存用户习惯----end


var KenFor_WangLingTong_Body;
var WangLingTong_List;
var WangLingTong_Breviary;
var WangLingTong_Timer;
var WangLingTong_Direction;
var WangLingTong_ThisPosition;
var WangLingTong_Config={
    WangLingTong_ShowLimit : -3,
    WangLingTong_HideLimit : -142,
    WangLingTong_x : 7,
    WangLingTong_TimerSpace : 7
};

WangLingTong_ListShow = function(){
	WangLingTong_List = document.getElementById("KenFor_WangLingTong_List");
    KenFor_WangLingTong_Body = document.getElementById("KenFor_WangLingTong_Body");
    WangLingTong_Breviary = document.getElementById("KenFor_WangLingTong_Breviary");
    
    if(WangLingTong_List.offsetHeight>=WangLingTong_Breviary.offsetHeight){
        KenFor_WangLingTong_Body.style.height = WangLingTong_List.offsetHeight + 'px';
    }
    else{
        KenFor_WangLingTong_Body.style.height = WangLingTong_Breviary.offsetHeight + 'px';
    }
    if(WangLingTong_List.offsetWidth>=WangLingTong_Breviary.offsetWidth){
        KenFor_WangLingTong_Body.style.width = WangLingTong_List.offsetWidth + 'px';
    }
    else{
        KenFor_WangLingTong_Body.style.width = WangLingTong_Breviary.offsetWidth + 'px';
    }
	
    WangLingTong_Direction = KenFor_WangLingTong_Body.attributes['data-KenForWangLingTongFloat'].value;
    
    ListPositionAdd(WangLingTong_Direction,WangLingTong_Config.WangLingTong_ShowLimit);
};

WangLingTong_ListHide = function(){
	WangLingTong_List = document.getElementById("KenFor_WangLingTong_List");
    KenFor_WangLingTong_Body = document.getElementById("KenFor_WangLingTong_Body");
    WangLingTong_Breviary = document.getElementById("KenFor_WangLingTong_Breviary");
	
    WangLingTong_Direction = KenFor_WangLingTong_Body.attributes['data-KenForWangLingTongFloat'].value;
    
    ListPositionMinus(WangLingTong_Direction,WangLingTong_Config.WangLingTong_HideLimit);
};

//滑入方法
function ListPositionAdd(Direction,MaxValue){
	//去除空格
	Direction = Direction.trim();
    if(Direction=="left"){
        WangLingTong_ThisPosition = parseInt(WangLingTong_List.style.left);
    }
    else if(Direction=="right"){
        WangLingTong_ThisPosition = parseInt(WangLingTong_List.style.right);
    }
    clearInterval(WangLingTong_Timer);
    WangLingTong_Timer = setInterval(function(){
        WangLingTong_ThisPosition += WangLingTong_Config.WangLingTong_x;
        if(WangLingTong_ThisPosition > MaxValue){
            WangLingTong_ThisPosition = MaxValue;
            clearInterval(WangLingTong_Timer);
            WangLingTong_Breviary.style.visibility="hidden";
        }
        if(Direction=="left"){
            WangLingTong_List.style.left = WangLingTong_ThisPosition + "px";
        }
        else if(Direction=="right"){
            WangLingTong_List.style.right = WangLingTong_ThisPosition + "px";
        }
    },WangLingTong_Config.WangLingTong_TimerSpace);
}

//滑出方法
function ListPositionMinus(Direction,MaxValue){
	//去除空格
	Direction = Direction.trim();
    if(Direction=="left"){
        WangLingTong_ThisPosition = parseInt(WangLingTong_List.style.left);
    }
    else if(Direction=="right"){
        WangLingTong_ThisPosition = parseInt(WangLingTong_List.style.right);
    }
    clearInterval(WangLingTong_Timer);
    WangLingTong_Timer = setInterval(function(){
        WangLingTong_ThisPosition -= WangLingTong_Config.WangLingTong_x;
        if(WangLingTong_ThisPosition < MaxValue){
            WangLingTong_ThisPosition = MaxValue;
            clearInterval(WangLingTong_Timer);
            KenFor_WangLingTong_Body.style.height = '0';
            KenFor_WangLingTong_Body.style.width = '0';
            WangLingTong_Breviary.style.visibility="visible";
        }
        if(Direction=="left"){
            WangLingTong_List.style.left = WangLingTong_ThisPosition + "px";
        }
        else if(Direction=="right"){
            WangLingTong_List.style.right = WangLingTong_ThisPosition + "px";
        }
    },WangLingTong_Config.WangLingTong_TimerSpace);
}
//新悬浮框滑动js--end

//AJAX-----------BEGIN
var req;
var init_flag = false;
function loadXMLDoc(url, fun, method, args) {
	if (window.XMLHttpRequest) {
		req = new XMLHttpRequest();
		req.onreadystatechange = fun;
		req.open(method, url, true);
		if (method == "POST") {
			req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		}
		req.send(args);  
		
	} else {
		if (window.ActiveXObject) {
			req = new ActiveXObject("Microsoft.XMLHTTP");
			if (req) {
				req.onreadystatechange = fun;
				req.open(method, url, true);
				if (method == "POST") {
					req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				}
				req.send(args);
			}
		}
	}
}
//提供给ie获取数据方法
function loadXMLDocToIE(url, fun) {
	if (window.XDomainRequest) {
		req = new XDomainRequest();
		req.open('GET', url);   
        req.onload = fun;   
        req.send();   
		
	} else {
		if (window.ActiveXObject) {
			req = new ActiveXObject("Microsoft.XMLHTTP");
			if (req) {
				req.onreadystatechange = fun;
				req.open(method, url, true);
				if (method == "POST") {
					req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
				}
				req.send(args);
			}
		}
	}
}
//AJAX-----------END
//读xml标签数据-----------BEGIN
function getElementTextNS(prefix, local, parentElem, index) {
	try {
		var result = "";
		if (prefix && (Sys.ie || Sys.firefox)) {
			result = parentElem.getElementsByTagName(prefix + ":" + local)[index];
		} else {
			result = parentElem.getElementsByTagName(local)[index];
		}
		if (result) {
			if (result.childNodes.length > 1) {
				return result.childNodes[1].nodeValue;
			} else {
				return result.firstChild.nodeValue;
			}
		} else {
			return "n/a";
		}
	}
	catch (e) {
		return "";
	}
}

//读xml标签数据-----------END
//流量分析--------BEGIN
function getSystemLanguage() {
	var strResult;
	var language = navigator.systemLanguage;
	if (language) {
		return language;
	} else {
		return navigator.language.toLowerCase();
	}
}
function getUserLanguage() {
	var strResult;
	var language = navigator.userLanguage;
	if (language) {
		return language;
	} else {
		return navigator.language.toLowerCase();
	}
}
function k_uOrg(t) {
	if (_ur == "0" || _ur == "" || _ur == "-") {
		return "";
	}
	if (_ur.indexOf("http://cpro.baidu.com") >= 0) {
		return "";
	}
	 if(_ur.indexOf('show.roogoo.com')>0)
		 _ur=unescape(_ur);
	 var i=0,h,k;
	 if ((i=_ur.indexOf("://")) < 0) return "";
	 h=_ur.substring(i+3,_ur.length);
	 if (h.indexOf("/") > -1) {
	  h=h.substring(0,h.indexOf("/"));
	 }
	 for (var ii=0;ii<k_uOsr.length;ii++) {
	  if (h.toLowerCase().indexOf(k_uOsr[ii].toLowerCase()) > -1) {
	   if ((i=_ur.indexOf("?"+k_uOkw[ii]+"=")) > -1 || (i=_ur.indexOf("&"+k_uOkw[ii]+"=")) > -1 || (i=_ur.indexOf("#"+k_uOkw[ii]+"=")) > -1) {
		k=_ur.substring(i+k_uOkw[ii].length+2,_ur.length);
		if ((i=k.indexOf("&")) > -1) k=k.substring(0,i);
		for (var yy=0;yy<k_uOno.length;yy++) {
		 if (k_uOno[yy].toLowerCase()==k.toLowerCase()) { _ufno=1; break; }
		}
		if (t) return k_uEC(k);
		else return escape(k_uEC(k))+"&searchenger="+k_uEC(k_uOsr[ii]);
	   }
	  }
	 }
	 return "";
}
function get_keyword(url) {
	var encode = "UTF-8";
	var keywords = "";
	var _Enginers = new Array({name:"google.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"baidu.com", encode:"utf8", keyWord:"wd", ie:"ie"}, {name:"yahoo.com", encode:"utf8", keyWord:"p", ie:"ei"}, {name:"yisou.com", encode:"utf8", keyWord:"search", ie:"ie"}, {name:"live.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"tom.com", encode:"gbk", keyWord:"word", ie:"ie"}, {name:"163.com", encode:"gbk", keyWord:"q", ie:"ie"}, {name:"iask.com", encode:"gbk", keyWord:"k", ie:"ie"}, {name:"soso.com", encode:"gbk", keyWord:"w", ie:"ie"}, {name:"sogou.com", encode:"utf8", keyWord:"query", ie:"ie"}, {name:"zhongsou.com", encode:"gbk", keyWord:"w", ie:"ie"}, {name:"3721.com", encode:"gbk", keyWord:"p", ie:"ie"}, {name:"openfind.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"alltheweb.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"lycos.com", encode:"utf8", keyWord:"query", ie:"ie"}, {name:"onseek.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"youdao.com", encode:"utf8", keyWord:"q", ie:"ue"}, {name:"bing.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"118114.com", encode:"gbk", keyWord:"kw", ie:"ie"}, {name:"35so.com", encode:"utf8", keyWord:"queryString", ie:"ie"}, {name:"jike.com", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"360.cn", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"so.con", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"yisou.con", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"ask.con", encode:"utf8", keyWord:"q", ie:"ie"}, {name:"uc.cn", encode:"utf8", keyWord:"keyword", ie:"ie"});
	if (url.match("youdao.com") && url.match(/search\?/)) {
		if (m = url.match(/(ue=)([\w-]*)/)) {
			return "&encode=" + m[2] + "&host=" + fUrl(url);
		} else {
			if (m = url.match(/(ie=)([\w-]*)/)) {
				return "&encode=" + m[2] + "&host=" + fUrl(url);
			} else {
				if (url.match(/keyfrom=dh\.win7000/)) {
					return "&encode=gbk&host=" + fUrl(url);
				} else {
					return "&encode=utf8&host=" + fUrl(url);
				}
			}
		}
	}
	if (url.match("sogou.com") && url.match(/sogou\?/)) {
		if (m = url.match(/(ie=)([\w-]*)/)) {
			return;
		}
		return "&encode=gbk&host=" + fUrl(url);
	}
	for (var i in _Enginers) {
		if (url.match(_Enginers[i].name)) {
			if (matchA = url.match("(" + _Enginers[i].ie + "=)([\\w-]*)")) {
				encode = matchA[2];
			} else {
				encode = _Enginers[i].encode;
			}
			break;
		}
	}
	//alert(encode+":"+fUrl(url));
	return "&encode=" + encode + "&host=" + fUrl(url);
}
function _do_save_track() {
	var cook = navigator["cookieEnabled"];
	var pform = getOS();
	var syslan = getSystemLanguage();
	var userlan = getUserLanguage();
	var appName = getBrowser();
	var appV = navigator["appVersion"].substring(0, 3);
	var cpu = navigator["cpuClass"];
	_ur = this_referr;
	var key = k_uOrg(false);
	var key_words = key + get_keyword(_ur);
	var this_referr2 = this_referr;
	if(key_words.indexOf("zyjidian.com") != -1 || this_referr2.indexOf("zyjidian.com") != -1){
		return ;
	}
	
	var Kimg = new Image();
	Kimg.onload = new function () {
		window.status = "saved track";
	};
	Kimg.src = xml_path + "/saveTrackAction.do?client_id=" + client_id + "&src_type=2&charset=" + __charset + "&visiter=" + visiter + "&account_id=" + kacct + "&key_words=" + key_words + "&url=" + keC(this_url) + "&cook=" + cook + "&pform=" + keC(pform) + "&syslan=" + syslan + "&userlan=" + userlan + "&appName=" + keC(appName) + "&appV=" + appV + "&cpu=" + cpu + "&referr=" + keC(this_referr2) + "&title=" + keC(this_title) + "&.rnd=" + Math.random();
}
var dict = "wkfsolujrp";
function encode_str(dict, result) {
	enresult = "";
	for (i = 0; i < result.length; i++) {
		if (result.charAt(i) == ",") {
			enresult += "e";
		} else {
			if (result.charAt(i) == ".") {
				enresult += "d";
			} else {
				if (result.charAt(i) == "-") {
					enresult += "h";
				} else {
					if (result.charAt(i) == "0") {
						enresult += "g";
					} else {
						tmp = 10 - result.charAt(i);
						enresult += dict.charAt(tmp);
					}
				}
			}
		}
	}
	return enresult;
}
function decode_str(dict, enresult) {
	deresult = "";
	for (i = 0; i < enresult.length; i++) {
		if (enresult.charAt(i) == "e") {
			deresult += ",";
		} else {
			if (enresult.charAt(i) == "d") {
				deresult += ".";
			} else {
				if (enresult.charAt(i) == "h") {
					deresult += "/";
				} else {
					if (enresult.charAt(i) == "g") {
						deresult += "0";
					} else {
						for (j = 0; j < dict.length; j++) {
							if (enresult.charAt(i) == dict.charAt(j)) {
								deresult += (10 - j) + "";
							}
						}
					}
				}
			}
		}
	}
	return deresult;
}
//流量分析--------END
/***获取模板三的固定图片点击事件(给测试用) editby laizhentao 16-09-09*/
function openChatDialog(){
		if((is_ie7)&&(!is_phone)){
			if(has_online_operator){
				cP(xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path ,"chat" + min_clients_target_id ,cpw,cph,"no");
			}else{
				O_P_M_W(admin_target_id);
			}
		}else if(is_phone){
			if(has_online_operator){
				cP(xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path ,"chat" + min_clients_target_id ,cpw,cph,"no");
			}else{
				O_P_M_W(admin_target_id);
			}
		}else{
			if(has_online_operator){
				cP(xml_path + "/"+tagPage+"?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + min_clients_target_id + "&im_skin=" + skin_path ,"chat" + min_clients_target_id ,cpw,cph,"no");
			}else{
				O_P_M_W(admin_target_id);
				
			}
		}
}

//客服在线时弹出窗方法
function showDetail(img_w_type, s_target_id) {
	if (img_w_type == 0 || img_w_type == 10) {
		return;
	}
	var item, div, content, title;
	if (target_name == "") {
		target_name = GLS(guest_name);
	}
	if (img_w_type == 1) {
		chat_target_id = s_target_id;
		chat_target_name = s_target_id;
		if (online_user != null && online_user.length > 0) {
			for (i = 0; i < online_user.length; i++) {
				var tmp = online_user[i];
				if (tmp.member_id == chat_target_id) {
					chat_target_name = tmp.net_name;
				}
			}
		}
		s_c_m_b("<a onclick='javascript:void(0)' style=\"text-decoration: none;\" href=\"javascript:cP('" + xml_path + "/" + tagPage + "?ln=" + target_ln + "&src_type=" + src_type + "&is_show_ssi=" + is_show_ssi + "&c=" + kacct + "&client_id=" + client_id + "&target_id=" + chat_target_id + "&im_skin=" + skin_path + "','chat" + chat_target_id + "'," + cpw + "," + cph + ",'no');closeDiv();\"'>" + chat_target_name + GLS(new_message_array_new) + "</a>", chat_target_id);
	} else {
		if (img_w_type == 2) {
			chat_target_id = s_target_id;
			chat_target_name = s_target_id;
			if (online_user != null && online_user.length > 0) {
				for (i = 0; i < online_user.length; i++) {
					var tmp = online_user[i];
					if (tmp.member_id == chat_target_id) {
						chat_target_name = tmp.net_name;
					}
				}
			}
			//客户访问时手机版不自动弹窗
			if(!is_phone){
				s_n_m_b(GLS(welcome_msg_new) + "|" + chat_target_id + "|" + chat_target_name + "|");
			}
		}
	}
	
}
	function do_delete_msg(chat_target_id) {
		Kimg = new Image();
		Kimg.src = xml_path + ado + "?account_id=" + kacct + "&src_type=" + src_type + "&is_delete=0&client_id=" + client_id + "&target_id=" + chat_target_id + "&opt=get&.rnd=" + Math.random();
	}
	function closeDivDelete(chat_target_id) {
		wC("has_refuse", 1, 1);
		is_auto_pop = false;
		has_refuse = true;
		do_delete_msg(chat_target_id);
		is_show = false;
		dT(auto_get_msg);
		auto_get_msg = sT(__getMsg, get_msg_time_scape);
		getObj("float_notice_win").innerHTML = "";
		if (floters_notice_time) {
			window.dT(floters_notice_time);
		}
	}
	function closeDiv() {
		wC("has_refuse", 1, 1);
		is_auto_pop = false;
		has_refuse = true;
		is_show = false;
		dT(auto_get_msg);
		auto_get_msg = sT(__getMsg, get_msg_time_scape);
		getObj("float_notice_win").innerHTML = "";
		if (floters_notice_time) {
			window.dT(floters_notice_time);
		}
	}

//错误-----------BEGIN

//错误-----------END
  var WangLingTong_DragMove = function(){
        var Aside = document.getElementById("KenFor_WangLingTong_Fixed");
        var state = false;
        var objX,objY,touX,touY,newX,newY;
        var WinH,WinW;
        var Size = parseInt(Aside.style.width);
        var OffsetX = -parseInt(Aside.style.marginLeft);
        WinH = document.documentElement.clientHeight;
        WinW = document.documentElement.clientWidth;
        window.onresize = function(){
            WinH = document.documentElement.clientHeight;
            WinW = document.documentElement.clientWidth;
            Aside.style.left = "100%";
            Aside.style.top = "70%";
        };
                console.dir(Aside);
        Aside.addEventListener("touchstart",function(e){
            state = true;
            objX = parseInt(Aside.offsetLeft);
            objY = parseInt(Aside.offsetTop);
            touX = e.touches[0].pageX;
            touY = e.touches[0].pageY;
        });
        Aside.addEventListener("touchmove",function(e){
            if(state){
                e.preventDefault();
                newX = objX + e.touches[0].pageX - touX + OffsetX;
                newY = objY + e.touches[0].pageY - touY;
                if(newX-OffsetX < 0){ newX = OffsetX; }
                if(newX > WinW){ newX = WinW+OffsetX-Size; }
                if(newY < 0){ newY = 0; }
                if(newY+Size > WinH){ newY = WinH-Size; }
                Aside.style.left = newX + "px";
                Aside.style.top = newY + "px";
            }
        });
        Aside.addEventListener("touchend",function(){
            state = false;
        });
    };
//加载
    
    js_init(c_accountId,interface_lan);
//window.onload = new function() {
//          
//        };



